Skip to main content

flake8 super call checker

Project description

flake8-super-call is a Flake8 extension that checks Python methods for anti-pattern super calls.

When calling super in a derived class, passing self.__class__ to super() can give the wrong starting point to search for methods, and will end up calling its own method again. More details on this Stack Overflow question.

Installation

Install from PyPI using pip:

$ pip install flake8-super-call

The extension will be activated automatically by flake8. You can verify that it has been loaded by inspecting the flake8 --version:

$ flake8 --version
3.5.0 (flake8_super_call: 1.0.0, mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 2.7.10 on Darwin

Error Codes

This extension adds one new error code:

  • S777: Cannot use self.__class__ as first argument of super() call

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-super-call-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

flake8_super_call-1.0.0-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flake8-super-call-1.0.0.tar.gz.

File metadata

File hashes

Hashes for flake8-super-call-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0486ebfb24e3bf104b1c1d7f823a51ebcefb3a26108b25cb3129a9e8a57ef145
MD5 aa123f033f6d2612b549411eb5df09dc
BLAKE2b-256 af49e60ac07d16a51259d5a7d1d8055fe1def557a1aff99355d283f75909be5f

See more details on using hashes here.

File details

Details for the file flake8_super_call-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_super_call-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 61cfcd0c8ad78e1cf1f4d1225cb7513666ab9c5a9900a238b2c4abee8ad9a7de
MD5 21c5a9ee0688ad6763cec2fc8545cf4c
BLAKE2b-256 cb1c71062c4d5e2bff40b4f31dd8d93eab3e6477fb2ab5cd0b465df773e23916

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page