Skip to content

Commit

Permalink
fix: ozi-fix correctly appends to add and remove args
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <rjdbcm@outlook.com>
  • Loading branch information
rjdbcm committed Nov 19, 2024
1 parent 18e36dd commit ca1f9fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions ozi_core/fix/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=SUPPRESS,
)
parser.add_argument(
'--remove',
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=SUPPRESS,
)
parser.add_argument(
Expand Down Expand Up @@ -67,15 +67,15 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=SUPPRESS,
)
missing_parser.add_argument(
'--remove',
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=SUPPRESS,
)
missing_output = missing_parser.add_argument_group(TRANSLATION('term-output'))
Expand Down Expand Up @@ -120,7 +120,7 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=TRANSLATION('term-help-fix-add'),
)
source_parser.add_argument(
Expand All @@ -129,7 +129,7 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=TRANSLATION('term-help-fix-remove'),
)
source_parser.add_argument(
Expand Down Expand Up @@ -172,7 +172,7 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=TRANSLATION('term-help-fix-add'),
)
test_parser.add_argument(
Expand All @@ -181,7 +181,7 @@
metavar='FILENAME',
nargs='?',
action=AppendRewriteCommandTarget,
default=['ozi.phony'],
default=[],
help=TRANSLATION('term-help-fix-remove'),
)
test_parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion ozi_core/fix/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __call__( # pragma: defer to E2E
items = getattr(namespace, self.dest, None)
items = _copy_items(items)
items.append(values) # type: ignore
setattr(namespace, self.dest, [values])
setattr(namespace, self.dest, [items])


class RewriteCommandTargetValidator(Validator):
Expand Down

0 comments on commit ca1f9fc

Please sign in to comment.