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

used-before-assignment when import guarded by TYPE_CHECKING guarded again when used #7979

Closed
jacobtylerwalls opened this issue Dec 24, 2022 · 0 comments · Fixed by #7980
Closed
Labels
C: used-before-assignment Issues related to 'used-before-assignment' check False Positive 🦟 A message is emitted but nothing is wrong with the code
Milestone

Comments

@jacobtylerwalls
Copy link
Member

Bug description

This emits used-before-assignment...

https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/core.py#L551-L552

when this same name was imported like this...

https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/core.py#L41-L42

Configuration

No response

Command used

pylint

Pylint output

used-before-assignment

Expected behavior

no error

Pylint version

dev

OS / Environment

No response

Additional dependencies

No response

@jacobtylerwalls jacobtylerwalls added Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling False Positive 🦟 A message is emitted but nothing is wrong with the code C: used-before-assignment Issues related to 'used-before-assignment' check labels Dec 24, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.15.10 milestone Dec 24, 2022
@jacobtylerwalls jacobtylerwalls self-assigned this Dec 24, 2022
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Dec 27, 2022
@jacobtylerwalls jacobtylerwalls removed their assignment Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: used-before-assignment Issues related to 'used-before-assignment' check False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants