Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.
/ flake8-forelse Public archive

A Flake8 plugin which checks the use of for-else and while-else

License

Notifications You must be signed in to change notification settings

koviubi56/flake8-forelse

DEPRECATED - flake8-forelse

Hits-of-Code Codacy grade CodeFactor Grade Code style: black semantic-release GitHub PyPI PyPI - Python Version PyPI - Format

A Flake8 plugin which checks the use of for-else and while-else.

Installation

Use the package manager pip to install flake8-forelse. Need more help?

pip install flake8-forelse

Requirements

flake8-forelse requires Python 3.6, and of course flake8.

Usage

# FE1 for-else is not allowed
for i in range(10):
    print(i)
else:
    print("else")

# FE2 while-else is not allowed
i = 0
while i < 5:
    print(i)
    i += 1
else:
    print("while-else")

Support

Questions should be asked in the Discussions tab.

Feature requests and bug reports should be reported in the Issues tab.

Security vulnerabilities should be reported as described in our Security policy (the SECURITY.md file).

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to add entries to the changelog.

For more information, please read the contributing guidelines.

Authors and acknowledgments

A list of nice people who helped this project can be found in the CONTRIBUTORS file.

License

GNU GPLv3+