-
-
Notifications
You must be signed in to change notification settings - Fork 3k
type: ignore doesn't work with multi-line statements #3448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Also put statements in one line because of python/mypy#3448.
Unfortunately the suggested workaround doesn't work for from x import long, list, of, symbols, ... \
wrapping, around, and, further, ... \
... (e.g.
) Any ideas? |
You can put parentheses around your long list of imports instead of using backslashes. |
As I wrote, I can't make it work: from module_mypy_doesnt_know import ( a, b,
c, d,
e, f ) # type: ignore
|
Try
The type ignore has to be on the physical line where the error is reported. |
Seems to work, thanks. Though I find it really nasty - any good reason to have it like that (except for "wasn't yet implemented, because python parsing is too rigidly line oriented")? |
file.py
:gives output
which is wrong IMO.
The text was updated successfully, but these errors were encountered: