diff --git a/README.md b/README.md index 4147d03454ad..25203a09c830 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,6 @@ The below is an excerpt from the types for the `datetime` module. ``` MAXYEAR = ... # type: int MINYEAR = ... # type: int -__doc__ = ... # type: str -__file__ = ... # type: str -__name__ = ... # type: str -__package__ = ... # type: None class date(object): def __init__(self, year: int, month: int, day: int) -> None: ... diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 06793fabd0b4..e051f000aa34 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -26,7 +26,7 @@ class staticmethod: pass # Special, only valid as a decorator. class classmethod: pass # Special, only valid as a decorator. class object: - __doc__ = ... # type: str + __doc__ = ... # type: Optional[str] __class__ = ... # type: type def __init__(self) -> None: ... diff --git a/stdlib/2/abc.pyi b/stdlib/2/abc.pyi index 0eb26f01897e..3ae3b522bf0b 100644 --- a/stdlib/2/abc.pyi +++ b/stdlib/2/abc.pyi @@ -12,7 +12,6 @@ def abstractmethod(funcobj: Any) -> Any: ... class ABCMeta(type): # TODO: FrozenSet __abstractmethods__ = ... # type: Set[Any] - __doc__ = ... # type: str _abc_cache = ... # type: _weakrefset.WeakSet _abc_invalidation_counter = ... # type: int _abc_negative_cache = ... # type: _weakrefset.WeakSet @@ -31,7 +30,6 @@ class _C: # TODO: The real abc.abstractproperty inherits from "property". class abstractproperty(object): def __new__(cls, func: Any) -> Any: ... - __doc__ = ... # type: str __isabstractmethod__ = ... # type: bool doc = ... # type: Any fdel = ... # type: Any diff --git a/stdlib/2/ast.pyi b/stdlib/2/ast.pyi index 6e11445f798a..5bad0bc5796c 100644 --- a/stdlib/2/ast.pyi +++ b/stdlib/2/ast.pyi @@ -33,12 +33,10 @@ def literal_eval(node_or_string: Union[str, AST]) -> Any: ... def walk(node: AST) -> Iterator[AST]: ... class NodeVisitor(): - __doc__ = ... # type: str def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): - __doc__ = ... # type: str def generic_visit(self, node: AST) -> None: ... diff --git a/stdlib/2/optparse.pyi b/stdlib/2/optparse.pyi index e315ac4796e7..eb753b23b0bd 100644 --- a/stdlib/2/optparse.pyi +++ b/stdlib/2/optparse.pyi @@ -18,7 +18,6 @@ class OptParseError(Exception): def __init__(self, msg) -> None: ... class BadOptionError(OptParseError): - __doc__ = ... # type: str opt_str = ... # type: Any def __init__(self, opt_str) -> None: ... @@ -65,7 +64,6 @@ class HelpFormatter: def store_option_strings(self, parser) -> None: ... class IndentedHelpFormatter(HelpFormatter): - __doc__ = ... # type: str _long_opt_fmt = ... # type: str _short_opt_fmt = ... # type: str current_indent = ... # type: int @@ -93,7 +91,6 @@ class Option: TYPED_ACTIONS = ... # type: Tuple[str, ...] TYPES = ... # type: Tuple[str, ...] TYPE_CHECKER = ... # type: Dict[str, Callable] - __doc__ = ... # type: str _long_opts = ... # type: List[Text] _short_opts = ... # type: List[Text] action = ... # type: str @@ -162,7 +159,6 @@ class OptionGroup(OptionContainer): def set_title(self, title) -> None: ... class OptionParser(OptionContainer): - __doc__ = ... # type: str _long_opt = ... # type: Dict[Text, Any] _short_opt = ... # type: Dict[Any, Any] allow_interspersed_args = ... # type: bool @@ -220,11 +216,9 @@ class OptionParser(OptionContainer): def set_usage(self, usage: Text) -> None: ... class OptionValueError(OptParseError): - __doc__ = ... # type: str msg = ... # type: Any class TitledHelpFormatter(HelpFormatter): - __doc__ = ... # type: str _long_opt_fmt = ... # type: str _short_opt_fmt = ... # type: str current_indent = ... # type: int diff --git a/stdlib/2/tempfile.pyi b/stdlib/2/tempfile.pyi index 320f7f46a200..ca2d4b475ecc 100644 --- a/stdlib/2/tempfile.pyi +++ b/stdlib/2/tempfile.pyi @@ -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 diff --git a/stdlib/2/types.pyi b/stdlib/2/types.pyi index 607d9fac1c3f..c3b66f40e95f 100644 --- a/stdlib/2/types.pyi +++ b/stdlib/2/types.pyi @@ -40,7 +40,6 @@ class FunctionType: __code__ = func_code __defaults__ = func_defaults __dict__ = func_dict - __doc__ = func_doc __globals__ = func_globals __name__ = func_name def __call__(self, *args: Any, **kwargs: Any) -> Any: ... diff --git a/stdlib/3/_importlib_modulespec.pyi b/stdlib/3/_importlib_modulespec.pyi index 20d889471400..a48baa59c774 100644 --- a/stdlib/3/_importlib_modulespec.pyi +++ b/stdlib/3/_importlib_modulespec.pyi @@ -26,7 +26,6 @@ if sys.version_info >= (3, 4): class ModuleType: __name__ = ... # type: str __file__ = ... # type: str - __doc__ = ... # type: Optional[str] if sys.version_info >= (3, 4): __loader__ = ... # type: Optional[Loader] __package__ = ... # type: Optional[str] diff --git a/stdlib/3/ast.pyi b/stdlib/3/ast.pyi index ac803687ae2b..86a8431accd8 100644 --- a/stdlib/3/ast.pyi +++ b/stdlib/3/ast.pyi @@ -19,12 +19,10 @@ from _ast import ( ) class NodeVisitor(): - __doc__ = ... # type: str def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): - __doc__ = ... # type: str def generic_visit(self, node: AST) -> None: ... def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ... diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 42b6e24bed18..28162d736f36 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -27,7 +27,7 @@ class staticmethod: pass # Special, only valid as a decorator. class classmethod: pass # Special, only valid as a decorator. class object: - __doc__ = ... # type: str + __doc__ = ... # type: Optional[str] __class__ = ... # type: type __dict__ = ... # type: Dict[str, Any] diff --git a/stdlib/3/types.pyi b/stdlib/3/types.pyi index 1026cb1c7743..4a0da754e867 100644 --- a/stdlib/3/types.pyi +++ b/stdlib/3/types.pyi @@ -21,7 +21,6 @@ class FunctionType: __code__ = ... # type: CodeType __defaults__ = ... # type: Optional[Tuple[Any, ...]] __dict__ = ... # type: Dict[str, Any] - __doc__ = ... # type: Optional[str] __globals__ = ... # type: Dict[str, Any] __name__ = ... # type: str def __call__(self, *args: Any, **kwargs: Any) -> Any: ... diff --git a/third_party/2/sqlalchemy/util/langhelpers.pyi b/third_party/2/sqlalchemy/util/langhelpers.pyi index c16b1f91c754..c688ba33dfb5 100644 --- a/third_party/2/sqlalchemy/util/langhelpers.pyi +++ b/third_party/2/sqlalchemy/util/langhelpers.pyi @@ -48,7 +48,6 @@ def as_interface(obj, cls=..., methods=..., required=...): ... class memoized_property: fget = ... # type: Any - __doc__ = ... # type: Any __name__ = ... # type: Any def __init__(self, fget, doc=...) -> None: ... def __get__(self, obj, cls): ... @@ -92,7 +91,6 @@ def assert_arg_type(arg, argtype, name): ... def dictlike_iteritems(dictlike): ... class classproperty: - __doc__ = ... # type: Any def __init__(self, fget, *arg, **kw) -> None: ... def __get__(desc, self, cls): ... diff --git a/third_party/3/typed_ast/ast27.pyi b/third_party/3/typed_ast/ast27.pyi index 163b6a2e91c5..dd26314e6b65 100644 --- a/third_party/3/typed_ast/ast27.pyi +++ b/third_party/3/typed_ast/ast27.pyi @@ -2,12 +2,10 @@ import typing from typing import Any, Optional, Union, Generic, Iterator class NodeVisitor(): - __doc__ = ... # type: str def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): - __doc__ = ... # type: str def generic_visit(self, node: AST) -> None: ... def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ... diff --git a/third_party/3/typed_ast/ast35.pyi b/third_party/3/typed_ast/ast35.pyi index 04e8a295d19f..2a18ff7d88aa 100644 --- a/third_party/3/typed_ast/ast35.pyi +++ b/third_party/3/typed_ast/ast35.pyi @@ -2,12 +2,10 @@ import typing from typing import Any, Optional, Union, Generic, Iterator class NodeVisitor(): - __doc__ = ... # type: str def visit(self, node: AST) -> Any: ... def generic_visit(self, node: AST) -> None: ... class NodeTransformer(NodeVisitor): - __doc__ = ... # type: str def generic_visit(self, node: AST) -> None: ... def parse(source: Union[str, bytes], filename: Union[str, bytes] = ..., mode: str = ...) -> AST: ...