Skip to content

private member access linting plugin for flake8

Notifications You must be signed in to change notification settings

ngnpope/flake8-self

 
 

Repository files navigation

PyPI Anaconda Travis

flake8-self

Private member access linting plugin for flake8.

Example

> pipenv run flake8 example.py
example.py:10:1: SLF001 Private member access
example.py:11:1: SLF001 Private member access

example.py:

class Foo(object):
    def __init__(self):
        self.public_thing = "bar"
        self._private_thing = "quux"
        self.__really_private_thing = "quuz"


foo = Foo()
print(foo.public_thing)
print(foo._private_thing)  # SLF001 Private member access
print(foo.__really_private_thing)  # SLF001 Private member access
print(foo.__dict__)

About

private member access linting plugin for flake8

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%