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 -f tornado/ioloop.py
$ mypy -f -s tornado/ioloop.py
tornado/ioloop.py:48: error: Module has no attribute 'set_close_exec'
tornado/ioloop.py:48: error: Module has no attribute 'Waker'
In Tornado, I prefer to use inline annotations instead of stub files, but occasionally I use a stub for something that would be too tricky to mark up inline. In this case, a stub file imports and reexports definitions from a python file. With -s, python imports are silently ignored.
My suggestion would be to solve this by making -s apply only to imports that appear in .py files; imports in .pyi files would always be processed regardless of their target.
Implement the idea in the issue by Ben Darnell. (However, this
implementation still silences the case where main.py -> stub.pyi ->
x.py -> y.py. Hopefully that doesn't matter.)
In Tornado, I prefer to use inline annotations instead of stub files, but occasionally I use a stub for something that would be too tricky to mark up inline. In this case, a stub file imports and reexports definitions from a python file. With
-s
, python imports are silently ignored.My suggestion would be to solve this by making
-s
apply only to imports that appear in.py
files; imports in.pyi
files would always be processed regardless of their target.(Versions tested: tornadoweb/tornado@b69982477, ac193cf9dd, python/typeshed@68306484a)
The text was updated successfully, but these errors were encountered: