Skip to main content

Take your Python syntax back to the 90s!

Project description

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.

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-simplicity-0.0.1.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file flake8-simplicity-0.0.1.tar.gz.

File metadata

  • Download URL: flake8-simplicity-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for flake8-simplicity-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c96a49b6dcccff4d3e1e08ad07ccd9df4d65959c7cf0241eb82b817da746541f
MD5 feb1e1edb60af5317ca91c5815a829e5
BLAKE2b-256 e804b9f283b82feec9405e2569777f5f33e5659e22132ddcaec439567467da1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page