Use PEP 585 syntax in @python2/_ast, convert more TypeVars to _typeshed.Self, & # noqa a SQLAlchemy line (#6954)

* Manual fixes for `_ast` and `SQLAlchemy`

* Change more `TypeVar`s to `Self`, using script
This commit is contained in:
Alex Waygood
2022-01-18 19:15:34 +00:00
committed by GitHub
parent 989fe11806
commit cd93461225
9 changed files with 105 additions and 102 deletions

View File

@@ -36,7 +36,7 @@ class Enum(metaclass=EnumMeta):
def _missing_(cls, value: object) -> Any: ...
@staticmethod
def _generate_next_value_(name: str, start: int, count: int, last_values: list[Any]) -> Any: ...
def __new__(cls: type[_T], value: object) -> _T: ...
def __new__(cls: type[Self], value: object) -> Self: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def __dir__(self) -> list[str]: ...