Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce metaclass-related false positives from Y034 #436

Merged
merged 4 commits into from
Nov 2, 2023
Merged

Conversation

AlexWaygood
Copy link
Collaborator

See astral-sh/ruff#8353 for context. The heuristics here feel pretty hacky, but I think it's the best we can do :/

@github-actions

This comment has been minimized.

pyi.py Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

Copy link

github-actions bot commented Nov 1, 2023

This change has no effect on typeshed. 🤖🎉

@JelleZijlstra JelleZijlstra self-requested a review November 1, 2023 18:58
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@srittau srittau merged commit 0ccf764 into main Nov 2, 2023
20 checks passed
@srittau srittau deleted the false-Selfs branch November 2, 2023 14:21
charliermarsh added a commit to astral-sh/ruff that referenced this pull request Nov 13, 2023
PEP 673 forbids the use of `typing(_extensions).Self` in metaclasses, so
we want to avoid flagging `PYI034` on metaclasses. This is based on an
analogous change in `flake8-pyi`:
PyCQA/flake8-pyi#436.

Closes #8353.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants