X Tutup
Skip to content

Commit 92c3d1f

Browse files
committed
Fix mypy regression
1 parent 9984c23 commit 92c3d1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bpython/patch_linecache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ class BPythonLinecache(dict):
88

99
def __init__(self, *args, **kwargs) -> None:
1010
super().__init__(*args, **kwargs)
11-
self.bpython_history = []
11+
self.bpython_history: List[Tuple[int, None, List[str], str]] = []
1212

1313
def is_bpython_filename(self, fname: Any) -> bool:
14-
try:
14+
if isinstance(fname, str):
1515
return fname.startswith("<bpython-input-")
16-
except AttributeError:
16+
else:
1717
# In case the key isn't a string
1818
return False
1919

0 commit comments

Comments
 (0)
X Tutup