Skip to content

[pylint] Implement nonlocal-and-global (E115)#10407

Merged
charliermarsh merged 4 commits intoastral-sh:mainfrom
hikaru-kajita:nonlocal-and-global
Mar 18, 2024
Merged

[pylint] Implement nonlocal-and-global (E115)#10407
charliermarsh merged 4 commits intoastral-sh:mainfrom
hikaru-kajita:nonlocal-and-global

Conversation

@hikaru-kajita
Copy link
Contributor

Summary

Implement E115 in the issue #970.
Reference to pylint docs: https://pylint.readthedocs.io/en/stable/user_guide/messages/error/nonlocal-and-global.html
Throws an error when a variable name is both declared as global and nonlocal

Test Plan

With nonlocal_and_global.py

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh self-requested a review March 18, 2024 00:28
@charliermarsh charliermarsh added rule Implementing or modifying a lint rule preview Related to preview mode features labels Mar 18, 2024
Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thanks!

@charliermarsh charliermarsh enabled auto-merge (squash) March 18, 2024 00:36
@charliermarsh charliermarsh merged commit fd26b29 into astral-sh:main Mar 18, 2024
@hikaru-kajita hikaru-kajita deleted the nonlocal-and-global branch March 18, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants