| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| from typing_extensions import TypeAlias | ||
|
|
||
| _F = TypeVar("_F", bound=Callable[..., Any]) | ||
| _DurationsType: TypeAlias = list[tuple[unittest.case.TestCase, float]] |
There was a problem hiding this comment.
At least collectedDurations (ugh, camel case...) uses list[tuple[str, float]]:
Sorry, something went wrong.
There was a problem hiding this comment.
Although the docs are wrong: https://docs.python.org/3.12/library/unittest.html?highlight=collecteddurations#unittest.TestResult.collectedDurations
But even the tests use str: https://github.com/python/cpython/blob/24b9bdd6eaf0b04667b6cd4c8154f7c7c10c2398/Lib/test/test_unittest/test_runner.py#L1402
I will send a PR to CPython.
Sorry, something went wrong.
There was a problem hiding this comment.
Yeap, I used docs for this type. Let's wait for your PR to land first.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks like a deliberate change to fix a circular reference, they just forgot to update the docs: python/cpython#106888
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: tornado (https://github.com/tornadoweb/tornado)
+ tornado/test/runtests.py:72: error: Unused "type: ignore" comment [unused-ignore]
+ tornado/test/runtests.py:78: error: Unused "type: ignore" comment [unused-ignore]
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Source commit: python/cpython@6883007