Lint your Python like it was 1999!
Do you ever miss the days when your coworker couldn't convert 10 straightforward lines of Python into a mess of decorators and multiline dictionary comprehensions?
Would you like it if no-one could make annoying comments on your PR about how you could make it 'nicer' by using with, walrus operators, and yield?
Could you pass on deciding to rewrite your entire application to use async?
Think that maybe there are 27 ways to do it in today's Python, and that that's pretty damn annoying?
Then install flake8-simplicity today.
If this gets added to the CI for an open source project of decent size with decent usage (without a mess of # noqa), and it passes on master, drop me a line and I'll send you a postcard. Offer limited to the first 5 participants.
Motivation
I was whinging aimlessly about the latest changes to Python to a co-worker, as you do, and claimed that sometimes I wish I could do:
from __past__ import simplicity
But hacking the Python interpreter seemed non-trivial, there's no chance that the PEP would get up, and also no-one would use it. A linter, on the other hand...
Usage
This is a flake8 plugin. So...
pip install flake8-simplicity
flake8 myfile.py # or however you like to lint
Errors from flake8 simplicity are prefixed with SPL, and are perhaps not the most informative. A PR to create a humourous message for each infelicity would be gladly accepted.
PS
Yes, I'm aware of the irony of using yield statements
in this code.
Metadata
Release files for flake8-simplicity 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flake8-simplicity-0.0.1.tar.gz | 2.9 kB | Without provenance | Details for flake8-simplicity-0.0.1.tar.gz |
Release files / flake8-simplicity-0.0.1.tar.gz
| Download URL | flake8-simplicity-0.0.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c96a49b6dcccff4d3e1e08ad07ccd9df4d65959c7cf0241eb82b817da746541f
|
|
BLAKE2b-256 checksum How to use checksums |
e804b9f283b82feec9405e2569777f5f33e5659e22132ddcaec439567467da1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3
|
Security for flake8-simplicity 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.