Skip to content

Commit

Permalink
🐛📄: updated disclaimer for CLI apps
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jun 24, 2024
1 parent e28959a commit 5760da1
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 16 deletions.
22 changes: 22 additions & 0 deletions ozi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,28 @@
add_help=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=EPILOG,
usage="""%(prog)s [options]
The information provided on this application does not, and is not intended to,
constitute legal advice. All information, content, and materials available
on this application are for general informational purposes only.
Information on this application may not constitute the most up-to-date legal
or other information.
THE LICENSE TEMPLATES, LICENSE IDENTIFIERS, LICENSE CLASSIFIERS, AND
LICENSE EXPRESSION PARSING SERVICES, AND ALL OTHER CONTENTS ARE PROVIDED
"AS IS", NO REPRESENTATIONS ARE MADE THAT THE CONTENT IS ERROR-FREE
AND/OR APPLICABLE FOR ANY PURPOSE, INCLUDING MERCHANTABILITY.
Readers of this disclaimer should contact their attorney to obtain advice
with respect to any particular legal matter. The OZI Project is not a
law firm and does not provide legal advice. No reader or user of this
application should act or abstain from acting on the basis of information
on this application without first seeking legal advice from counsel in the
relevant jurisdiction. Legal counsel can ensure that the information
provided in this application is applicable to your particular situation.
Use of, or reading, this application or any of resources contained within
does not create an attorney-client relationship.""",
) # pragma: no cover
tools = parser.add_mutually_exclusive_group() # pragma: no cover
tools.add_argument( # pragma: no cover
Expand Down
5 changes: 4 additions & 1 deletion ozi/fix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def main() -> NoReturn: # pragma: no cover
rewriter = Rewriter(str(project.target), project.name, project.fix, env)
rewriter += project.add
rewriter -= project.remove
print(json.dumps(rewriter.commands, indent=4 if project.pretty else None))
if len(project.add) > 0 or len(project.remove) > 0:
print(json.dumps(rewriter.commands, indent=4 if project.pretty else None))
else:
parser.print_help()
case [True, True]:
with TAP.strict():
name, *_ = report(project.target)
Expand Down
53 changes: 52 additions & 1 deletion ozi/fix/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,58 @@
prog='ozi-fix',
description=sys.modules[__name__].__doc__,
add_help=False,
usage='%(prog)s [options] | [positional arguments]',
usage="""%(prog)s [options] | [positional arguments]
The information provided on this application does not, and is not intended to,
constitute legal advice. All information, content, and materials available
on this application are for general informational purposes only.
Information on this application may not constitute the most up-to-date legal
or other information.
THE LICENSE TEMPLATES, LICENSE IDENTIFIERS, LICENSE CLASSIFIERS, AND
LICENSE EXPRESSION PARSING SERVICES, AND ALL OTHER CONTENTS ARE PROVIDED
"AS IS", NO REPRESENTATIONS ARE MADE THAT THE CONTENT IS ERROR-FREE
AND/OR APPLICABLE FOR ANY PURPOSE, INCLUDING MERCHANTABILITY.
Readers of this disclaimer should contact their attorney to obtain advice
with respect to any particular legal matter. The OZI Project is not a
law firm and does not provide legal advice. No reader or user of this
application should act or abstain from acting on the basis of information
on this application without first seeking legal advice from counsel in the
relevant jurisdiction. Legal counsel can ensure that the information
provided in this application is applicable to your particular situation.
Use of, or reading, this application or any of resources contained within
does not create an attorney-client relationship.
""",
)
parser.add_argument('target', default='.', type=str, nargs='?', help=argparse.SUPPRESS)
parser.add_argument(
'--add',
metavar='FILENAME',
nargs='?',
action='append',
default=['ozi.phony'],
help=SUPPRESS,
)
parser.add_argument(
'--remove',
metavar='FILENAME',
nargs='?',
action='append',
default=['ozi.phony'],
help=SUPPRESS,
)
parser.add_argument(
'--strict',
default=False,
action=BooleanOptionalAction,
help=SUPPRESS,
)
parser.add_argument(
'--pretty',
default=False,
action=BooleanOptionalAction,
help=SUPPRESS,
)
subparser = parser.add_subparsers(help='', metavar='', dest='fix')

Expand Down
32 changes: 19 additions & 13 deletions ozi/new/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,25 @@ def check_package_exists() -> Validator:

message_dialog(
title='ozi-new interactive prompt',
text="""The information provided on this prompt does not, and is not intended to, constitute legal advice.
All information, content, and materials available on this prompt are for general informational purposes only.
Information on this prompt may not constitute the most up-to-date legal or other information.
THE LICENSE TEMPLATES, LICENSE IDENTIFIERS, LICENSE CLASSIFIERS, AND LICENSE EXPRESSION PARSING SERVICES,
AND ALL OTHER CONTENTS ARE PROVIDED "AS IS", NO REPRESENTATIONS ARE MADE THAT THE CONTENT IS ERROR-FREE
AND/OR APPLICABLE FOR ANY PURPOSE, INCLUDING MERCHANTABILITY.
Readers of this prompt should contact their attorney to obtain advice with respect to any particular legal matter.
No reader or user of this prompt should act or abstain from acting on the basis of information on this prompt
without first seeking legal advice from counsel in the relevant jurisdiction.
Legal counsel can ensure that the information provided in this prompt is applicable to your particular situation.
Use of, or reading, this prompt or any of resources contained within does not create an attorney-client relationship.
text="""
The information provided on this prompt does not, and is not intended to,
constitute legal advice. All information, content, and materials available
on this prompt are for general informational purposes only. Information on this
prompt may not constitute the most up-to-date legal or other information.
THE LICENSE TEMPLATES, LICENSE IDENTIFIERS, LICENSE CLASSIFIERS, AND LICENSE
EXPRESSION PARSING SERVICES, AND ALL OTHER CONTENTS ARE PROVIDED "AS IS",
NO REPRESENTATIONS ARE MADE THAT THE CONTENT IS ERROR-FREE AND/OR APPLICABLE
FOR ANY PURPOSE, INCLUDING MERCHANTABILITY.
Readers of this prompt should contact their attorney to obtain advice with
respect to any particular legal matter. The OZI Project is not a law firm
and does not provide legal advice. No reader or user of this prompt should
act or abstain from acting on the basis of information on this prompt without
first seeking legal advice from counsel in the relevant jurisdiction.
Legal counsel can ensure that the information provided in this prompt is
applicable to your particular situation. Use of, or reading, this prompt or any
of resources contained within does not create an attorney-client relationship.
""",
style=style,
).run()
Expand Down
23 changes: 22 additions & 1 deletion ozi/new/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,28 @@
prog='ozi-new',
description=sys.modules[__name__].__doc__,
add_help=False,
usage='%(prog)s [options] | [positional args]', # noqa: B950,E501,RUF100
usage="""%(prog)s [options] | [positional args]
The information provided on this application does not, and is not intended to,
constitute legal advice. All information, content, and materials available
on this application are for general informational purposes only.
Information on this application may not constitute the most up-to-date legal
or other information.
THE LICENSE TEMPLATES, LICENSE IDENTIFIERS, LICENSE CLASSIFIERS, AND
LICENSE EXPRESSION PARSING SERVICES, AND ALL OTHER CONTENTS ARE PROVIDED
"AS IS", NO REPRESENTATIONS ARE MADE THAT THE CONTENT IS ERROR-FREE
AND/OR APPLICABLE FOR ANY PURPOSE, INCLUDING MERCHANTABILITY.
Readers of this disclaimer should contact their attorney to obtain advice
with respect to any particular legal matter. The OZI Project is not a
law firm and does not provide legal advice. No reader or user of this
application should act or abstain from acting on the basis of information
on this application without first seeking legal advice from counsel in the
relevant jurisdiction. Legal counsel can ensure that the information
provided in this application is applicable to your particular situation.
Use of, or reading, this application or any of resources contained within
does not create an attorney-client relationship.""",
)
subparser = parser.add_subparsers(help='', metavar='', dest='new')
interactive_parser = subparser.add_parser(
Expand Down

0 comments on commit 5760da1

Please sign in to comment.