A Flake8 plugin which checks the use of for-else and while-else.
Use the package manager pip to install flake8-forelse. Need more help?
pip install flake8-forelse
flake8-forelse requires Python 3.6, and of course flake8.
# 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")
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).
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.
A list of nice people who helped this project can be found in the CONTRIBUTORS file.