Skip to content

Commit 423ae20

Browse files
authored
Merge pull request #1224 from mulkieran/add-type-annotations
Add type annotations to _parser/_logical.py
2 parents d3f8a4e + b82090d commit 423ae20

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/stratis_cli/_parser/_logical.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@
1616
"""
1717

1818
# isort: STDLIB
19-
from argparse import SUPPRESS
19+
from argparse import SUPPRESS, ArgumentParser, Namespace
20+
from typing import Optional, Tuple
21+
22+
# isort: THIRDPARTY
23+
from justbytes import Range
2024

2125
from .._actions import LogicalActions
2226
from ._debug import FILESYSTEM_DEBUG_SUBCMDS
2327
from ._shared import UUID_OR_NAME, RejectAction, parse_range
2428

2529

26-
def parse_range_or_current(values):
30+
def parse_range_or_current(values: str) -> Tuple[Optional[Range], str]:
2731
"""
2832
Allow specifying a Range or the value "current". Include the original
2933
value specified by the user as well as the Range result if the user
@@ -39,10 +43,10 @@ class FilesystemListOptions: # pylint: disable=too-few-public-methods
3943
Verifies filesystem list options.
4044
"""
4145

42-
def __init__(self, _namespace):
46+
def __init__(self, _namespace: Namespace):
4347
pass
4448

45-
def verify(self, namespace, parser):
49+
def verify(self, namespace: Namespace, parser: ArgumentParser):
4650
"""
4751
Do supplementary parsing of conditional arguments.
4852
"""

0 commit comments

Comments
 (0)