Skip to content

Commit d699532

Browse files
committed
Cleanup
1 parent e931909 commit d699532

File tree

5 files changed

+4
-2916
lines changed

5 files changed

+4
-2916
lines changed

invoke/collection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
113113
for name, obj in kwargs.items():
114114
self._add_object(obj, name)
115115

116-
def _add_object(
117-
self, obj: Any, name: Optional[str] = None
118-
) -> None:
116+
def _add_object(self, obj: Any, name: Optional[str] = None) -> None:
119117
method: Callable[[Any, Optional[str]], None]
120118
if isinstance(obj, Task):
121119
method = self.add_task

invoke/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ class AmbiguousMergeError(ValueError):
11731173

11741174
def merge_dicts(
11751175
base: Dict[str, _T], updates: Optional[Dict[str, _T]]
1176-
) -> Dict[str, Union[_T]]:
1176+
) -> Dict[str, _T]:
11771177
"""
11781178
Recursively merge dict ``updates`` into dict ``base`` (mutating ``base``.)
11791179

invoke/parser/parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def parse_argv(self, argv: List[str]) -> ParseResult:
115115
.. versionadded:: 1.0
116116
"""
117117
machine = ParseMachine(
118-
initial=self.initial, # type: ignore[arg-type] # FIXME: should not be none
118+
# FIXME: initial should not be none
119+
initial=self.initial, # type: ignore[arg-type]
119120
contexts=self.contexts,
120121
ignore_unknown=self.ignore_unknown,
121122
)

invoke/terminals.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
import termios
4545
import tty
4646

47-
# Mypy bug: https://github.com/python/mypy/issues/14605
48-
# mypy: disable_error_code=name-defined
49-
5047

5148
if sys.platform == "win32":
5249

0 commit comments

Comments
 (0)