mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 05:22:23 +08:00
Consider __doc__ always Optional. (#641)
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid. As suggested by @gvanrossum in python/mypy#2380, all __doc__ should be considered Optional. (Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
This commit is contained in:
committed by
Guido van Rossum
parent
1d47c6fdb8
commit
15ec66cdd6
@@ -19,7 +19,6 @@ template = ... # type: str
|
||||
_name_sequence = ... # type: Optional[_RandomNameSequence]
|
||||
|
||||
class _RandomNameSequence:
|
||||
__doc__ = ... # type: str
|
||||
_rng = ... # type: random.Random
|
||||
_rng_pid = ... # type: int
|
||||
characters = ... # type: str
|
||||
@@ -31,7 +30,6 @@ class _RandomNameSequence:
|
||||
def normcase(path: AnyStr) -> AnyStr: ...
|
||||
|
||||
class _TemporaryFileWrapper(IO[str]):
|
||||
__doc__ = ... # type: str
|
||||
close_called = ... # type: bool
|
||||
delete = ... # type: bool
|
||||
file = ... # type: IO
|
||||
|
||||
Reference in New Issue
Block a user