Skip to content

False negatives for disallowed-name due to control flow in NameChecker #10679

@jacobtylerwalls

Description

@jacobtylerwalls

Bug description

When NameChecker uses control flow to short-circuit before calling self._check_name(), it's usually to avoid emitting invalid-name. But we should still check disallowed-name.

foo = {}.keys() # Should raise disallowed-name once _check_name() is refactored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    False Negative 🦋No message is emitted but something is wrong with the code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions