Fix typings for unittest.TestCase.assertLessEqual (#10798)

This commit is contained in:
Imogen
2023-09-29 01:03:20 +02:00
committed by GitHub
parent 6074a8f544
commit b76b2afdf3

View File

@@ -126,9 +126,9 @@ class TestCase:
@overload
def assertLess(self, a: _T, b: SupportsDunderGT[_T], msg: Any = None) -> None: ...
@overload
def assertLessEqual(self, a: SupportsDunderLT[_T], b: _T, msg: Any = None) -> None: ...
def assertLessEqual(self, a: SupportsDunderLE[_T], b: _T, msg: Any = None) -> None: ...
@overload
def assertLessEqual(self, a: _T, b: SupportsDunderGT[_T], msg: Any = None) -> None: ...
def assertLessEqual(self, a: _T, b: SupportsDunderGE[_T], msg: Any = None) -> None: ...
# `assertRaises`, `assertRaisesRegex`, and `assertRaisesRegexp`
# are not using `ParamSpec` intentionally,
# because they might be used with explicitly wrong arg types to raise some error in tests.