Skip to main content

flake8 plugin to check code quality in loops

Project description

flake8_loopy

Code style: black Checked with mypy GitHub Build Status codecov

basic code quality checks in loops

pip install flake8_loopy

checks

error code description
LPY100 unused variable created by enumerate(): you probably do not need enumerate(), or you should use range(len()) instead
LPY101 variable created by for loop shadows a variable in its outer context

future

  • iteration with index where index is only used to get an item (should iterate directly over items)

notes

please report false positives / errors if found! contributions welcome.

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_loopy-1.1.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

flake8_loopy-1.1.0-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

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