-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
stubs: improvementImprove/refactor existing annotations, other stubs issuesImprove/refactor existing annotations, other stubs issues
Description
Several classes in typeshed inherit from Any
, and should not.
$ ag "class .*\(Any\)"
stdlib\3\multiprocessing\context.pyi
118: class ForkProcess(Any): # type: ignore
124: class SpawnProcess(Any): # type: ignore
130: class ForkServerProcess(Any): # type: ignore
148: class SpawnProcess(Any): # type: ignore
stdlib\3\types.pyi
81:class SimpleNamespace(Any): ... # type: ignore
stdlib\3\unittest\mock.pyi
34: class NonCallableMock(Any):
tests\pytype_blacklist.txt
11:# Because of 'class ForkProcess(Any): # type: ignore'
third_party\3\jwt\algorithms.pyi
3:class Algorithm(Any): ... # type: ignore
As can be seen, all but one of these are type-ignore'd and thus not picked up by mypy.
The multiprocessing classes have # TODO: type should be BaseProcess once a stub in multiprocessing.process exists
, so that should be okay to change, as that module is there.
The types.pyi
SimpleNameSpace
needed my __setattr__
implementation.
Apparently the same for NonCallableMock
JWT stubs just seem very incomplete.
Metadata
Metadata
Assignees
Labels
stubs: improvementImprove/refactor existing annotations, other stubs issuesImprove/refactor existing annotations, other stubs issues