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

@override is not detected when re-exported #5400

Closed
bersbersbers opened this issue Jun 27, 2023 · 2 comments
Closed

@override is not detected when re-exported #5400

bersbersbers opened this issue Jun 27, 2023 · 2 comments
Labels
question Asking for support or clarification

Comments

@bersbersbers
Copy link
Contributor

bersbersbers commented Jun 27, 2023

#3910 is great! However, it does not work for me when re-exporting override:

override.py

__all__ = ["override"]
from typing_extensions import override

bug.py

from override import override

@override
def BAD_FUN() -> None:
    pass
  • ruff bug.py --select N802 --isolated
  • Python 3.11.4, ruff 0.0.275

Output:

bug.py:5:5: N802 Function name `BAD_FUN` should be lowercase
@charliermarsh
Copy link
Member

Can you try marking your override module via typing-modules?

@charliermarsh charliermarsh added the question Asking for support or clarification label Jun 27, 2023
@bersbersbers
Copy link
Contributor Author

This is embarrassing. This is great. This is awesome. Is there anything ruff cannot do already? This is supposed to be beta software, so why does it behave like a stable product?

I will have to read the full docs at one point just to amaze myself.

Thanks for your help, sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for support or clarification
Projects
None yet
Development

No branches or pull requests

2 participants