Update pyright version to 1.1.350 (#11501)

If you're reading about this commit in an auto-generated changelog: this is an internal change that should have no impact on how these stubs are understood by static-analysis tools such as type checkers or IDEs
This commit is contained in:
Nikita Sobolev
2024-02-29 13:14:39 +03:00
committed by GitHub
parent 7b4c751abb
commit 675ab38ab7
8 changed files with 85 additions and 71 deletions

View File

@@ -100,5 +100,5 @@ extra-standard-library = [
known-first-party = ["parse_metadata", "utils"]
[tool.typeshed]
pyright_version = "1.1.342"
pyright_version = "1.1.350"
oldest_supported_python = "3.8"

View File

@@ -11,7 +11,7 @@ from pathlib import Path
from typing import Any
try:
from termcolor import colored # pyright: ignore[reportGeneralTypeIssues]
from termcolor import colored # pyright: ignore[reportAssignmentType]
except ImportError:
def colored(text: str, color: str | None = None, **kwargs: Any) -> str: # type: ignore[misc]

View File

@@ -384,7 +384,7 @@ else:
# While this is true in general, here it's sort-of okay to have a covariant subclass,
# since the only reason why `asyncio.Future` is invariant is the `set_result()` method,
# and `asyncio.Task.set_result()` always raises.
class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportGeneralTypeIssues]
class Task(Future[_T_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments]
if sys.version_info >= (3, 12):
def __init__(
self,

View File

@@ -1220,7 +1220,7 @@ class property:
class _NotImplementedType(Any):
# A little weird, but typing the __call__ as NotImplemented makes the error message
# for NotImplemented() much better
__call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportGeneralTypeIssues]
__call__: NotImplemented # type: ignore[valid-type] # pyright: ignore[reportInvalidTypeForm]
NotImplemented: _NotImplementedType

View File

@@ -208,7 +208,7 @@ with_descriptors.descriptor = 0 # type: ignore
with_descriptors.typed_not_none = ""
with_descriptors.typed_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.typed_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.typed_not_none = 0 # type: ignore
with_descriptors.typed_none = ""
@@ -220,23 +220,23 @@ with_descriptors.typed_none = 0 # type: ignore
with_descriptors.set_tuple = "a"
with_descriptors.set_tuple = 0
with_descriptors.set_tuple = 0.0
with_descriptors.set_tuple = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_list = "a"
with_descriptors.set_list = 0
with_descriptors.set_list = 0.0
with_descriptors.set_list = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_list = "none" # can't check literals validity
with_descriptors.set_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple_none = "a"
with_descriptors.set_tuple_none = 0
with_descriptors.set_tuple_none = 0.0
with_descriptors.set_tuple_none = None
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.noneset_tuple = "a"
@@ -244,14 +244,14 @@ with_descriptors.noneset_tuple = 0
with_descriptors.noneset_tuple = 0.0
with_descriptors.noneset_tuple = None
with_descriptors.noneset_tuple = "none"
with_descriptors.noneset_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.noneset_list = "a"
with_descriptors.noneset_list = 0
with_descriptors.noneset_list = 0.0
with_descriptors.noneset_list = None
with_descriptors.noneset_list = "none"
with_descriptors.noneset_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_list = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
# NOTE: Can't validate tuple length in a generic manner
@@ -267,7 +267,7 @@ with_descriptors.length_list = "" # type: ignore
with_descriptors.match_pattern_str = ""
with_descriptors.match_pattern_str = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_str = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.match_pattern_str = b"" # type: ignore
with_descriptors.match_pattern_str = 0 # type: ignore
@@ -277,7 +277,7 @@ with_descriptors.match_pattern_str_none = b"" # type: ignore
with_descriptors.match_pattern_str_none = 0 # type: ignore
with_descriptors.match_pattern_bytes = b""
with_descriptors.match_pattern_bytes = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.match_pattern_bytes = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.match_pattern_bytes = "" # type: ignore
with_descriptors.match_pattern_bytes = 0 # type: ignore
@@ -289,8 +289,8 @@ with_descriptors.match_pattern_bytes_none = 0 # type: ignore
with_descriptors.convertible_not_none = 0
with_descriptors.convertible_not_none = "0"
with_descriptors.convertible_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.convertible_none = 0
with_descriptors.convertible_none = "0"
@@ -301,7 +301,7 @@ with_descriptors.convertible_none = object() # FIXME: False negative(?) in pyri
with_descriptors.minmax_float = 0
with_descriptors.minmax_float = "0"
with_descriptors.minmax_float = 0.0
with_descriptors.minmax_float = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_float = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.minmax_float = object() # type: ignore
with_descriptors.minmax_float_none = 0
@@ -313,7 +313,7 @@ with_descriptors.minmax_float_none = object() # type: ignore
with_descriptors.minmax_int = 0
with_descriptors.minmax_int = "0"
with_descriptors.minmax_int = 0.0
with_descriptors.minmax_int = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_int = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.minmax_int = object() # type: ignore
with_descriptors.minmax_int_none = 0
@@ -340,7 +340,7 @@ with_descriptors.bool_none = object() # type: ignore
with_descriptors.datetime_not_none = datetime(0, 0, 0)
with_descriptors.datetime_not_none = ""
with_descriptors.datetime_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.datetime_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.datetime_not_none = 0 # type: ignore
with_descriptors.datetime_not_none = date(0, 0, 0) # type: ignore
with_descriptors.datetime_not_none = time() # type: ignore
@@ -354,7 +354,7 @@ with_descriptors.datetime_none = time() # type: ignore
with_descriptors.string_not_none = ""
with_descriptors.string_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.string_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.string_not_none = 0 # type: ignore
with_descriptors.string_none = ""
@@ -366,8 +366,8 @@ with_descriptors.float_not_none = 0
with_descriptors.float_not_none = 0.0
with_descriptors.float_not_none = "0"
with_descriptors.float_not_none = b"0"
with_descriptors.float_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.float_none = 0
with_descriptors.float_none = 0.0
@@ -381,8 +381,8 @@ with_descriptors.integer_not_none = 0
with_descriptors.integer_not_none = 0.0
with_descriptors.integer_not_none = "0"
with_descriptors.integer_not_none = b"0"
with_descriptors.integer_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.integer_none = 0
with_descriptors.integer_none = 0.0

View File

@@ -196,35 +196,39 @@ with_descriptors.descriptor = cast(_HasTagAndGet[int], _) # type: ignore
with_descriptors.set_tuple = "a"
with_descriptors.set_tuple = 0
with_descriptors.set_tuple = 0.0
with_descriptors.set_tuple = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = "none" # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = cast(_HasTagAndGet[Literal["a"]], _)
with_descriptors.set_tuple = cast(_HasTagAndGet[str], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = cast(_HasTagAndGet[None], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = cast(_HasTagAndGet[object], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple = cast(_HasTagAndGet[str], _) # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = cast(_HasTagAndGet[None], _) # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
with_descriptors.set_list = "a"
with_descriptors.set_list = 0
with_descriptors.set_list = 0.0
with_descriptors.set_list = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_list = "none" # can't check literals validity
with_descriptors.set_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_list = cast(_HasTagAndGet[Literal["a"]], _)
with_descriptors.set_list = cast(_HasTagAndGet[str], _) # can't check literals validity
with_descriptors.set_list = cast(_HasTagAndGet[None], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = cast(_HasTagAndGet[object], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_list = cast(_HasTagAndGet[None], _) # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_list = cast(_HasTagAndGet[object], _) # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple_none = "a"
with_descriptors.set_tuple_none = 0
with_descriptors.set_tuple_none = 0.0
with_descriptors.set_tuple_none = None
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = "none" # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.set_tuple_none = cast(_HasTagAndGet[Literal["a"]], _)
with_descriptors.set_tuple_none = cast(_HasTagAndGet[str], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[str], _
)
with_descriptors.set_tuple_none = cast(_HasTagAndGet[None], _)
with_descriptors.set_tuple_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.set_tuple_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
@@ -234,11 +238,13 @@ with_descriptors.noneset_tuple = 0
with_descriptors.noneset_tuple = 0.0
with_descriptors.noneset_tuple = None
with_descriptors.noneset_tuple = "none"
with_descriptors.noneset_tuple = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.noneset_tuple = cast(_HasTagAndGet[Literal["a"]], _)
with_descriptors.noneset_tuple = cast(_HasTagAndGet[str], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[str], _
)
with_descriptors.noneset_tuple = cast(_HasTagAndGet[None], _)
with_descriptors.noneset_tuple = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_tuple = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
@@ -247,24 +253,24 @@ with_descriptors.noneset_list = 0
with_descriptors.noneset_list = 0.0
with_descriptors.noneset_list = None
with_descriptors.noneset_list = "none"
with_descriptors.noneset_list = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_list = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.noneset_list = cast(_HasTagAndGet[Literal["a"]], _)
with_descriptors.noneset_list = cast(_HasTagAndGet[str], _)
with_descriptors.noneset_list = cast(_HasTagAndGet[None], _)
with_descriptors.noneset_list = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.noneset_list = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
with_descriptors.convertible_not_none = 0
with_descriptors.convertible_not_none = "0"
with_descriptors.convertible_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.convertible_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.convertible_not_none = cast(_HasTagAndGet[str], _)
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
@@ -295,16 +301,16 @@ with_descriptors.text_str_none = cast(_HasTagAndGet[object], _)
with_descriptors.text_int_not_none = 0
with_descriptors.text_int_not_none = "0"
with_descriptors.text_int_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.text_int_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
# If expected type (_T) is not str, it's impossible to use an Element as the value
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[int], _
)
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[str], _
)
@@ -313,18 +319,26 @@ with_descriptors.text_int_none = "0"
with_descriptors.text_int_none = None
with_descriptors.text_int_none = object() # FIXME: False negative(?) in pyright and mypy
# If expected type (_T) is not str, it's impossible to use an Element as the value
with_descriptors.text_int_none = cast(_HasTagAndGet[int], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_none = cast(_HasTagAndGet[None], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_none = cast(_HasTagAndGet[str], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.text_int_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[int], _
)
with_descriptors.text_int_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.text_int_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[str], _
)
with_descriptors.minmax_float = 0
with_descriptors.minmax_float = "0"
with_descriptors.minmax_float = 0.0
with_descriptors.minmax_float = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_float = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.minmax_float = object() # type: ignore
with_descriptors.minmax_float = cast(_HasTagAndGet[float], _)
with_descriptors.minmax_float = cast(_HasTagAndGet[None], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_float = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.minmax_float = cast(_HasTagAndGet[object], _) # type: ignore
with_descriptors.minmax_float_none = 0
@@ -339,10 +353,10 @@ with_descriptors.minmax_float_none = cast(_HasTagAndGet[object], _) # type: ign
with_descriptors.minmax_int = 0
with_descriptors.minmax_int = "0"
with_descriptors.minmax_int = 0.0
with_descriptors.minmax_int = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_int = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.minmax_int = object() # type: ignore
with_descriptors.minmax_int = cast(_HasTagAndGet[int], _)
with_descriptors.minmax_int = cast(_HasTagAndGet[None], _) # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.minmax_int = cast(_HasTagAndGet[None], _) # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.minmax_int = cast(_HasTagAndGet[object], _) # type: ignore
with_descriptors.minmax_int_none = 0
@@ -420,13 +434,13 @@ with_descriptors.float_not_none = 0
with_descriptors.float_not_none = 0.0
with_descriptors.float_not_none = "0"
with_descriptors.float_not_none = b"0"
with_descriptors.float_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.float_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.float_not_none = cast(_HasTagAndGet[float], _)
with_descriptors.float_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.float_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.float_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)
@@ -445,13 +459,13 @@ with_descriptors.integer_not_none = 0
with_descriptors.integer_not_none = 0.0
with_descriptors.integer_not_none = "0"
with_descriptors.integer_not_none = b"0"
with_descriptors.integer_not_none = None # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.integer_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
with_descriptors.integer_not_none = cast(_HasTagAndGet[int], _)
with_descriptors.integer_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[None], _
)
with_descriptors.integer_not_none = cast( # pyright: ignore[reportGeneralTypeIssues] # false negative in mypy
with_descriptors.integer_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
_HasTagAndGet[object], _
)

View File

@@ -64,7 +64,7 @@ class NoValue:
__imul__ = list.__imul__
__index__ = int.__index__
# self instead of cls
__init_subclass__ = plug # pyright: ignore[reportGeneralTypeIssues]
__init_subclass__ = plug # pyright: ignore[reportAssignmentType]
__int__ = int.__int__
__invert__ = int.__invert__
__ior__ = plug

View File

@@ -15,7 +15,7 @@ from typing_extensions import Annotated
import pathspec
try:
from termcolor import colored as colored # pyright: ignore[reportGeneralTypeIssues]
from termcolor import colored as colored # pyright: ignore[reportAssignmentType]
except ImportError:
def colored(text: str, color: str | None = None, **kwargs: Any) -> str: # type: ignore[misc]