-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
spurious unused-import with typing.BinaryIO and type comments #3217
Comments
chadrik
added a commit
to chadrik/beam
that referenced
this issue
Oct 27, 2019
chadrik
added a commit
to chadrik/beam
that referenced
this issue
Dec 9, 2019
pabloem
pushed a commit
to apache/beam
that referenced
this issue
Dec 11, 2019
* Address issues with a few missing modules/objects * Ignore some objects missing from typeshed * Ignore an issue regarding asymmetrical property getter/setter * Ignore unavoidable errors Many of these (those marked with [misc]) are due to mypy taking issue with: - the use of invalid type objects (typehints not typing) - the use of type objects at runtime * Ignore some conditional imports in tests * Ignore functions missing from typeshed * Add tests for Timestamp/Duration comparisons * Ignore errors about dynamic base classes This problem will be fixed when the next version of mypy is released * Ignore some monkey-patching for tests * Consolidate python build requirements This resolves a pip conflict that was happening between setupVirtualenv task and the tox task by ensuring that everything agrees on the same set of versions. * Ignore a difficult scenario where None is sometimes unsafe `None` is only safe to pass as the context to Coder.to_runner_api() when we know that the Coder class does not have components, otherwise the context is used to find and convert them. We could remove the need for special case `ignores` by reorganizing our Coder class hierarchy to add a CompoundCoder base class or mixin. Right now this is the only place in the code that we need to ignore this problem, so it's not worth tackling now. * Add a mypy lint job The test runs but error status is ignored. * Workaround a bug in pylint pylint-dev/pylint#3217 * Add type annotations to bulk of python codebase There are no meaningful runtime changes in this commit. * Silence errors about overriding methods. This seems to be fine to do on an instance as long as the types match, but not on a class. * Address review notes * Rebase fixup
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Create this file:
Current behavior
Expected behavior
There should not be an error because BinaryIO is used.
It's interesting to note that the behavior is correct for List.
Also, the behavior is correct (no errors) using non-comment annotations
pylint --version output
The text was updated successfully, but these errors were encountered: