Skip to content

Commit d1d42e5

Browse files
committed
typing: make Optional parameters explicit
rather than implicitly setting a parameter `Optional[foo]`, by simply assigning it `None`, we make it explicit. This will be encouraged in newer mypy releases, and is currently enforced through `--strict`, so let's get going!
1 parent 37b9e77 commit d1d42e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iocage/lib/Filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _filter_string_has_globs(self, filter_string: str) -> bool:
116116
return False
117117

118118
def _split_filter_values(self, user_input: str) -> typing.List[str]:
119-
values: List[str] = []
119+
values: typing.List[str] = []
120120
escaped_comma_blocks = map(
121121
lambda block: block.split(","),
122122
user_input.split("\\,")
@@ -163,7 +163,7 @@ def __init__(
163163
typing.Iterable[typing.Union[Term, str]]
164164
]=None) -> None:
165165

166-
data: List[Union[Term, str]] = []
166+
data: typing.List[typing.Union[Term, str]] = []
167167

168168
if terms is not None:
169169

@@ -208,7 +208,7 @@ def match_key(self, key: str, value: str) -> bool:
208208

209209
return True
210210

211-
def _parse_term(self, user_input: str) -> List[Term]:
211+
def _parse_term(self, user_input: str) -> typing.List[Term]:
212212

213213
terms = []
214214

0 commit comments

Comments
 (0)