You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mypy --version
mypy 0.610
$ cat exception.py
def f() -> None:
excs = [IOError, LookupError]
try:
pass
except excs:
pass
$ mypy exception.py
exception.py:5: error: Exception type must be derived from BaseException
While it's true that this code is incorrect, I probably want to fix it by writing excs = (IOError, LookupError) rather than somehow making my list a subclass of BaseException.