Skip to content

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

Closed
@jacobtylerwalls

Description

@jacobtylerwalls

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: used-before-assignmentIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions