Skip to content

Commit ad5fdee

Browse files
committed
chore: housekeeping
1 parent 9ea57d1 commit ad5fdee

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

argunparse/argument_unparser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ def option_should_be_skipped(value: t.Any) -> bool:
1919
class ArgumentUnparser:
2020
"""For performing reverse operation to what argparse.ArgumentParser does."""
2121

22-
# pylint: disable = too-many-arguments
22+
# pylint: disable = too-many-arguments, too-many-positional-arguments
2323
def __init__(
2424
self, short_opt: str = '-', long_opt: str = '--', opt_value: str = '=',
2525
begin_delim: str = '"', end_delim: str = '"') -> None:
26-
2726
assert isinstance(short_opt, str)
2827
assert isinstance(long_opt, str)
2928
assert isinstance(opt_value, str)

test/examples.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
import collections
44
import itertools
55
import pathlib
6+
import typing as t
67

78
_UNPARSER_INIT_ARGS_EXAMPLES = [
89
('short_opt', {'-', '--', '_', '__'}),
910
('long_opt', {'-', '--', '_', '__'}),
1011
('opt_value', {'=', ' ', ''})]
1112

12-
OPTIONS = {
13+
OPTIONS: dict[str, dict[str, t.Any]] = {
1314
'-h': {'h': True}, '--verbosity=100': {'verbosity': 100},
1415
'--DEFINE=NDEBUG': {'DEFINE': 'NDEBUG'},
1516
'--long_flag': {'long_flag': True}, '-o=out_file.txt': {'o': 'out_file.txt'},
@@ -35,8 +36,6 @@
3536
('-123456790', -123456790), (str(2**16), 2**16), ('x', 'x'), ('y', 'y'), ('z', 'z'),
3637
(repr('hello world'), 'hello world')}
3738

38-
ARGUMENTS_SKIPPED = {}
39-
4039
ARGUMENTS_VARIANTS = [([ref1, ref2], [arg1, arg2])
4140
for ((ref1, arg1), (ref2, arg2)) in itertools.permutations(ARGUMENTS, 2)]
4241

0 commit comments

Comments
 (0)