Skip to content

Implement flake8-self #2411

@ngnpope

Description

@ngnpope

GitHub, PyPI.

  • SLF001: Private member access

Detects accessing a private attribute, e.g. obj._private, but allows for self._private, cls._private, and mcs._private (for in metaclasses). It doesn't currently check that cls._private is only within a class method, etc., which is something that could be improved. It also always allows access to dunders, e.g. obj.__eq__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginImplementing a known but unsupported plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions