Skip to content

Commit

Permalink
🔨📝 update docstrings and CLI helps.
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed May 22, 2024
1 parent 544204d commit adb9487
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 8 additions & 6 deletions ozi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@
helpers.add_argument( # pragma: no cover
'-e',
'--check-license-expr',
action='store',
action='store_const',
default=lambda: None,
const=license_expression,
)
helpers.add_argument( # pragma: no cover
'-i',
Expand All @@ -91,7 +93,9 @@
'-l',
'--list-available',
help=list_available.__doc__,
action='store',
default=lambda: None,
const=list_available,
action='store_const',
choices={i.name.replace('_', '-') for i in fields(ExactMatch) if i.repr},
)

Expand All @@ -102,10 +106,8 @@ def main() -> None: # pragma: no cover
ozi.version()
ozi.check_version()
ozi.info()
if ozi.list_available:
list_available(ozi.list_available)
elif ozi.check_license_expr:
license_expression(ozi.check_license_expr)
ozi.list_available()
ozi.check_license_expr()
ozi.fix()
ozi.new()
parser.print_help()
Expand Down
4 changes: 0 additions & 4 deletions ozi/new/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
# See LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""``ozi-new`` argparse argument parser.
.. versionchanged:: 1.5
Added `--[no-]enable-cython` argument. Default: `--no-enable-cython`
"""
from __future__ import annotations

Expand Down

0 comments on commit adb9487

Please sign in to comment.