Upgrade pyright, improve pyright config files (#8072)

This commit is contained in:
Alex Waygood
2022-06-16 18:50:50 +01:00
committed by GitHub
parent a2ef47660a
commit 6b0c8df9ec
12 changed files with 59 additions and 29 deletions

View File

@@ -1,4 +1,5 @@
import sys
from _typeshed import Self
from collections.abc import Callable
from typing import Any, Generic, TypeVar, overload
from typing_extensions import final
@@ -20,7 +21,7 @@ class ProxyType(Generic[_T]): # "weakproxy"
class ReferenceType(Generic[_T]):
__callback__: Callable[[ReferenceType[_T]], Any]
def __init__(self, o: _T, callback: Callable[[ReferenceType[_T]], Any] | None = ...) -> None: ...
def __new__(cls: type[Self], o: _T, callback: Callable[[ReferenceType[_T]], Any] | None = ...) -> Self: ...
def __call__(self) -> _T | None: ...
def __hash__(self) -> int: ...
if sys.version_info >= (3, 9):