-
Notifications
You must be signed in to change notification settings - Fork 23
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
Suggest using collections.abc etc, not typing (deprecated since 3.9) #46
Labels
Comments
9 tasks
This comment was marked as resolved.
This comment was marked as resolved.
AlexWaygood
added a commit
that referenced
this issue
Apr 18, 2022
A regression test for python/typeshed#7635 Refs #46 (but doesn't quite close it). Changes made: * Expand Y027 to cover all objects in typing that are aliases to objects in collections.abc, except for AbstractSet * Add new Y038 error code to forbid import AbstractSet from typing * Change the error message in Y023 to make it clear that imports from collections.abc are now preferred to imports from typing. * Refactor Y023 logic in pyi.py so as to quell flake8 from complaining that _check_import_or_attribute was getting too complex. * Some small refactorings of test files to make them compatible with the new checks.
The only two left to do here are |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affects:
AbstractSet
(ascollections.abc.Set
)AsyncContextManager
(ascontextlib.AbstractAsyncContextManager
)AsyncGenerator
AsyncIterable
AsyncIterator
Awaitable
ByteString
Callable
ChainMap
(ascollections.ChainMap
)Collection
Container
ContextManager
(ascontextlib.AbstractContextManager
)Coroutine
Counter
(ascollections.Counter
)DefaultDict
(ascollections.defaultdict
)Deque
(ascollections.Deque
)Generator
Hashable
ItemsView
Iterable
Iterator
KeysView
Mapping
MappingView
Match
(asre.Match
)MutableMapping
MutableSequence
MutableSet
OrderedDict
(ascollections.OrderedDict
)Pattern
(asre.Pattern
)Reversible
Sequence
Sized
ValuesView
The text was updated successfully, but these errors were encountered: