Enable ruff on Lib/test/test_typing.py#110179
Conversation
|
Locally I was getting this error when running ruff manually (with this PR branch): I don't know what that means or what's causing it, since there's no line number. But it doesn't seem to be causing any issues in CI 🤷 |
|
Minimal reproducer: from typing import Annotated
Annotated[int] |
|
Which is from: def test_too_few_type_args(self):
with self.assertRaisesRegex(TypeError, 'at least two arguments'):
Annotated[int] |
I reported this issue on the ruff Discord server (with the help of @hugovk's minimal repro -- thanks!). The issue will go away in the next ruff release (see astral-sh/ruff#7745, which is the fix). So we shouldn't need to worry about this now -- it should be fine to merge this! |
|
I wouldn't be surprised if there's a Ruff release today to support Python 3.12, they just merged a massive PR to support the new f-strings (astral-sh/ruff#7376) and one to declare support (astral-sh/ruff#7713). Let's wait a little bit and include that in here too. |
|
Thanks @AlexWaygood for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
|
Sorry, @AlexWaygood and @hugovk, I could not cleanly backport this to |
|
GH-110288 is a backport of this pull request to the 3.12 branch. |
|
GH-110290 is a backport of this pull request to the 3.11 branch. |
Enable ruff on `Lib/test/test_typing.py` (#110179)
This removes
Lib/test/test_typing.pyfrom the ignorelist we have for ruff. If merged, it means we'll get a helpful CI error if we accidentally have two test methods of the same name in the same class, which leads to one of the two tests being silently skipped.