mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Always use TypeAlias when assigning to Any (#8021)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from ..cmd import Command
|
||||
|
||||
_Reporter = Any # really docutils.utils.Reporter
|
||||
_Reporter: TypeAlias = Any # really docutils.utils.Reporter
|
||||
|
||||
# Only defined if docutils is installed.
|
||||
class SilentReporter(_Reporter):
|
||||
|
||||
@@ -876,8 +876,8 @@ class PercentStyle: # undocumented
|
||||
def format(self, record: Any) -> str: ...
|
||||
|
||||
class StrFormatStyle(PercentStyle): # undocumented
|
||||
fmt_spec = Any
|
||||
field_spec = Any
|
||||
fmt_spec: Pattern[str]
|
||||
field_spec: Pattern[str]
|
||||
|
||||
class StringTemplateStyle(PercentStyle): # undocumented
|
||||
_tpl: Template
|
||||
|
||||
@@ -440,7 +440,13 @@ class _SpecState:
|
||||
|
||||
def mock_open(mock: Any | None = ..., read_data: Any = ...) -> Any: ...
|
||||
|
||||
PropertyMock = Any
|
||||
class PropertyMock(Mock):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __get__(self: Self, obj: _T, obj_type: type[_T] | None = ...) -> Self: ...
|
||||
else:
|
||||
def __get__(self: Self, obj: _T, obj_type: type[_T] | None) -> Self: ...
|
||||
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def seal(mock: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user