Skip to content

Commit 0b28377

Browse files
authored
Add type hints to satisfy ty (#622)
1 parent 8ea2f63 commit 0b28377

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fire/inspectutils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,12 @@ def Info(component):
269269

270270
try:
271271
unused_code, lineindex = inspect.findsource(component)
272-
info['line'] = lineindex + 1
272+
info['line'] = lineindex + 1 # type: ignore
273273
except (TypeError, OSError):
274-
info['line'] = None
274+
info['line'] = None # type: ignore
275275

276276
if 'docstring' in info:
277-
info['docstring_info'] = docstrings.parse(info['docstring'])
277+
info['docstring_info'] = docstrings.parse(info['docstring']) # type: ignore
278278

279279
return info
280280

fire/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import sys
2020

2121
if sys.version_info[0:2] < (3, 8):
22-
_StrNode = ast.Str
22+
_StrNode = ast.Str # type: ignore # deprecated but needed for Python < 3.8
2323
else:
2424
_StrNode = ast.Constant
2525

0 commit comments

Comments
 (0)