mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-05 06:34:15 +08:00
make sure typevars defined in stubs are private (#989)
And also a few type aliases I noticed in the process.
Found using 59f9cac095
This commit is contained in:
committed by
Guido van Rossum
parent
984307bf45
commit
eb07fd3c1a
@@ -9,7 +9,7 @@ def strip_leading_underscores(attribute_name: AnyStr) -> AnyStr: ...
|
||||
|
||||
NOTHING = Any
|
||||
|
||||
T = TypeVar('T')
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def attributes(
|
||||
attrs: Sequence[Union[AnyStr, Attribute]],
|
||||
@@ -18,7 +18,7 @@ def attributes(
|
||||
apply_with_repr: bool = True,
|
||||
apply_immutable: bool = False,
|
||||
store_attributes: Optional[Callable[[type, Attribute], Any]] = None,
|
||||
**kw: Optional[dict]) -> Callable[[Type[T]], Type[T]]: ...
|
||||
**kw: Optional[dict]) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
class Attribute:
|
||||
def __init__(
|
||||
|
||||
4
third_party/2and3/mypy_extensions.pyi
vendored
4
third_party/2and3/mypy_extensions.pyi
vendored
@@ -1,9 +1,9 @@
|
||||
from typing import Dict, Type, TypeVar, Union
|
||||
|
||||
T = TypeVar('T')
|
||||
_T = TypeVar('_T')
|
||||
|
||||
|
||||
def TypedDict(typename: str, fields: Dict[str, Type[T]]) -> Type[dict]: ...
|
||||
def TypedDict(typename: str, fields: Dict[str, Type[_T]]) -> Type[dict]: ...
|
||||
|
||||
# Return type that indicates a function does not return.
|
||||
# This type is equivalent to the None type, but the no-op Union is necessary to
|
||||
|
||||
Reference in New Issue
Block a user