[mypy 1.10.0] Remove 'type: ignore' that became useless
This commit is contained in:
parent
4788165e69
commit
2b6c946a2b
|
@ -454,7 +454,7 @@ class ApproxScalar(ApproxBase):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Return true if the two numbers are within the tolerance.
|
# Return true if the two numbers are within the tolerance.
|
||||||
result: bool = abs(self.expected - actual) <= self.tolerance # type: ignore[arg-type]
|
result: bool = abs(self.expected - actual) <= self.tolerance
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Ignore type because of https://github.com/python/mypy/issues/4266.
|
# Ignore type because of https://github.com/python/mypy/issues/4266.
|
||||||
|
|
|
@ -167,7 +167,7 @@ def pytest_runtest_call(item: Item) -> None:
|
||||||
del sys.last_value
|
del sys.last_value
|
||||||
del sys.last_traceback
|
del sys.last_traceback
|
||||||
if sys.version_info >= (3, 12, 0):
|
if sys.version_info >= (3, 12, 0):
|
||||||
del sys.last_exc # type: ignore[attr-defined]
|
del sys.last_exc
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
@ -177,7 +177,7 @@ def pytest_runtest_call(item: Item) -> None:
|
||||||
sys.last_type = type(e)
|
sys.last_type = type(e)
|
||||||
sys.last_value = e
|
sys.last_value = e
|
||||||
if sys.version_info >= (3, 12, 0):
|
if sys.version_info >= (3, 12, 0):
|
||||||
sys.last_exc = e # type: ignore[attr-defined]
|
sys.last_exc = e
|
||||||
assert e.__traceback__ is not None
|
assert e.__traceback__ is not None
|
||||||
# Skip *this* frame
|
# Skip *this* frame
|
||||||
sys.last_traceback = e.__traceback__.tb_next
|
sys.last_traceback = e.__traceback__.tb_next
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ def test_store_except_info_on_error() -> None:
|
||||||
assert sys.last_type is IndexError
|
assert sys.last_type is IndexError
|
||||||
assert isinstance(sys.last_value, IndexError)
|
assert isinstance(sys.last_value, IndexError)
|
||||||
if sys.version_info >= (3, 12, 0):
|
if sys.version_info >= (3, 12, 0):
|
||||||
assert isinstance(sys.last_exc, IndexError) # type: ignore[attr-defined]
|
assert isinstance(sys.last_exc, IndexError)
|
||||||
|
|
||||||
assert sys.last_value.args[0] == "TEST"
|
assert sys.last_value.args[0] == "TEST"
|
||||||
assert sys.last_traceback
|
assert sys.last_traceback
|
||||||
|
|
Loading…
Reference in New Issue