Repository
flake8-positional-only
wemake-python-styleguide Flake8 plugin to forbid positional-only arguments in python3.8+ Why? Because they bring more confusion than help for a regular project. pip install flake8- · License MIT · Install via pip · Maintenance unmaintained
- License
- MIT
- Error code
- Description
- FPO100
- Found positional-only arguments
Specs
- Error codeDescription
- FPO100Found positional-only arguments
README
flake8-positional-only
Deprecated, use wemake-python-styleguide instead
Flake8 plugin to forbid positional-only arguments in python3.8+
Why? Because they bring more confusion than help for a regular project.
Installation
pip install flake8-positional-only
Code example
What code is considered correct?
Any good old Python function and method definitions
with any parameters except positional-only parameters.
What code is considred incorrect?
def function(param, /):
...
Basically, we forbid positional-only
arguments in functions, methods, generators, coroutines, and lambdas.
In other words: everywhere they can potentionally be defined.
We don't check how they are used:
you can still pass whatever parameters you want.
Error codes
| Error code | Description |
|---|---|
| FPO100 | Found positional-only arguments |
License
MIT.