Skip to content

Built-in names in class scope should not be highlighted #44

Closed
@uranusjr

Description

@uranusjr

Currently built-in names are highlighted in definitions, even when they are inside a class scope:

class SomeClass:

    id = models.AutoField(...)   # Common in Django.

    def open(self):    # Also quite common. pathlib.Path.open is an example.
        pass

    class Exception:   # Less common, but possible.
        pass

I read the Built-ins and Magic Methods section in README, but am still not sure whether this is intentional. I can’t think of a case in which they can shadow built-in global names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions