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

unused-variable (N806) false positive on non-global type aliases #7068

Closed
DetachHead opened this issue Sep 3, 2023 · 1 comment · Fixed by #7119
Closed

unused-variable (N806) false positive on non-global type aliases #7068

DetachHead opened this issue Sep 3, 2023 · 1 comment · Fixed by #7119
Assignees
Labels
bug Something isn't working

Comments

@DetachHead
Copy link

Foo = int | str # no error


def foo():
    Bar = int | str # error: Variable `Bar` in function should be lowercase
@charliermarsh charliermarsh added the bug Something isn't working label Sep 3, 2023
@charliermarsh
Copy link
Member

We can probably only support avoiding this when marked as Bar: TypeAlias (which I'd recommend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants