mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-14 12:01:06 +08:00
Update mypy to 1.16.0 (#14194)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
co-authored by
Sebastian Rittau
Alex Waygood
parent
09b6802dc7
commit
eb495ff135
@@ -177,27 +177,27 @@ assert_type(with_descriptors.match_pattern_str_none, Union[str, None])
|
||||
assert_type(with_descriptors.match_pattern_bytes, ReadableBuffer)
|
||||
assert_type(with_descriptors.match_pattern_bytes_none, Union[ReadableBuffer, None])
|
||||
|
||||
assert_type(with_descriptors.convertible_not_none, int) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.convertible_not_none, int)
|
||||
assert_type(with_descriptors.convertible_none, Union[int, None])
|
||||
|
||||
assert_type(with_descriptors.minmax_float, float) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.minmax_float, float)
|
||||
assert_type(with_descriptors.minmax_float_none, Union[float, None])
|
||||
assert_type(with_descriptors.minmax_int, int) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.minmax_int, int)
|
||||
assert_type(with_descriptors.minmax_int_none, Union[int, None])
|
||||
|
||||
assert_type(with_descriptors.bool_not_none, bool) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.bool_not_none, bool)
|
||||
assert_type(with_descriptors.bool_none, Union[bool, None])
|
||||
|
||||
assert_type(with_descriptors.datetime_not_none, datetime) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.datetime_not_none, datetime)
|
||||
assert_type(with_descriptors.datetime_none, Union[datetime, None])
|
||||
|
||||
assert_type(with_descriptors.string_not_none, str) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.string_not_none, str)
|
||||
assert_type(with_descriptors.string_none, Union[str, None])
|
||||
|
||||
assert_type(with_descriptors.float_not_none, float) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.float_not_none, float)
|
||||
assert_type(with_descriptors.float_none, Union[float, None])
|
||||
|
||||
assert_type(with_descriptors.integer_not_none, int) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.integer_not_none, int)
|
||||
assert_type(with_descriptors.integer_none, Union[int, None])
|
||||
|
||||
|
||||
@@ -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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.convertible_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.convertible_not_none = None # type: ignore
|
||||
with_descriptors.convertible_not_none = object() # type: ignore
|
||||
|
||||
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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.minmax_float = None # type: ignore
|
||||
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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.minmax_int = None # type: ignore
|
||||
with_descriptors.minmax_int = object() # type: ignore
|
||||
|
||||
with_descriptors.minmax_int_none = 0
|
||||
@@ -354,7 +354,7 @@ with_descriptors.datetime_none = time() # type: ignore
|
||||
|
||||
|
||||
with_descriptors.string_not_none = ""
|
||||
with_descriptors.string_not_none = None # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.string_not_none = None # type: ignore
|
||||
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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.float_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.float_not_none = None # type: ignore
|
||||
with_descriptors.float_not_none = object() # type: ignore
|
||||
|
||||
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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.integer_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.integer_not_none = None # type: ignore
|
||||
with_descriptors.integer_not_none = object() # type: ignore
|
||||
|
||||
with_descriptors.integer_none = 0
|
||||
with_descriptors.integer_none = 0.0
|
||||
|
||||
@@ -167,19 +167,19 @@ assert_type(with_descriptors.minmax_float_none, Union[float, None])
|
||||
assert_type(with_descriptors.minmax_int, int)
|
||||
assert_type(with_descriptors.minmax_int_none, Union[int, None])
|
||||
|
||||
assert_type(with_descriptors.bool_not_none, bool) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.bool_not_none, bool)
|
||||
assert_type(with_descriptors.bool_none, Union[bool, None])
|
||||
|
||||
assert_type(with_descriptors.emptytag_not_none, bool)
|
||||
assert_type(with_descriptors.emptytag_none, Union[bool, None])
|
||||
|
||||
assert_type(with_descriptors.string_not_none, str) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.string_not_none, str)
|
||||
assert_type(with_descriptors.string_none, Union[str, None])
|
||||
|
||||
assert_type(with_descriptors.float_not_none, float) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.float_not_none, float)
|
||||
assert_type(with_descriptors.float_none, Union[float, None])
|
||||
|
||||
assert_type(with_descriptors.integer_not_none, int) # type: ignore[assert-type] # False-positive in mypy
|
||||
assert_type(with_descriptors.integer_not_none, int)
|
||||
assert_type(with_descriptors.integer_none, Union[int, None])
|
||||
|
||||
|
||||
@@ -264,15 +264,11 @@ with_descriptors.noneset_list = cast( # pyright: ignore[reportAttributeAccessIs
|
||||
|
||||
with_descriptors.convertible_not_none = 0
|
||||
with_descriptors.convertible_not_none = "0"
|
||||
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 = None # type: ignore
|
||||
with_descriptors.convertible_not_none = object() # type: ignore
|
||||
with_descriptors.convertible_not_none = cast(_HasTagAndGet[str], _)
|
||||
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[None], _
|
||||
)
|
||||
with_descriptors.convertible_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[object], _
|
||||
)
|
||||
with_descriptors.convertible_not_none = cast(_HasTagAndGet[None], _) # type: ignore
|
||||
with_descriptors.convertible_not_none = cast(_HasTagAndGet[object], _) # type: ignore
|
||||
|
||||
with_descriptors.convertible_none = 0
|
||||
with_descriptors.convertible_none = "0"
|
||||
@@ -426,15 +422,11 @@ 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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.float_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.float_not_none = None # type: ignore
|
||||
with_descriptors.float_not_none = object() # type: ignore
|
||||
with_descriptors.float_not_none = cast(_HasTagAndGet[float], _)
|
||||
with_descriptors.float_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[None], _
|
||||
)
|
||||
with_descriptors.float_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[object], _
|
||||
)
|
||||
with_descriptors.float_not_none = cast(_HasTagAndGet[None], _) # type: ignore
|
||||
with_descriptors.float_not_none = cast(_HasTagAndGet[object], _) # type: ignore
|
||||
|
||||
with_descriptors.float_none = 0
|
||||
with_descriptors.float_none = 0.0
|
||||
@@ -451,15 +443,11 @@ 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[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.integer_not_none = object() # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
with_descriptors.integer_not_none = None # type: ignore
|
||||
with_descriptors.integer_not_none = object() # type: ignore
|
||||
with_descriptors.integer_not_none = cast(_HasTagAndGet[int], _)
|
||||
with_descriptors.integer_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[None], _
|
||||
)
|
||||
with_descriptors.integer_not_none = cast( # pyright: ignore[reportAttributeAccessIssue] # false negative in mypy
|
||||
_HasTagAndGet[object], _
|
||||
)
|
||||
with_descriptors.integer_not_none = cast(_HasTagAndGet[None], _) # type: ignore
|
||||
with_descriptors.integer_not_none = cast(_HasTagAndGet[object], _) # type: ignore
|
||||
|
||||
with_descriptors.integer_none = 0
|
||||
with_descriptors.integer_none = 0.0
|
||||
|
||||
Reference in New Issue
Block a user