A linter/refactoring tool to make your code smell better!
Project description
Good Smell - it makes your code smell good!
A linting/refactoring library for python best practices and lesser-known tricks
This Tool tries to find bits of code that are possible to make more pythonic, more beautiful by using the language features and standard library functions you might not know about
For example Directly nested for loops (nested-for)
for i in seq_a:
for j in seq_b:
print(i, j)
will be flattened to a nested comprehension
for i, j in ((i,j) for i in seq_a for j in seq_b):
print(i, j)
For a full list - check the list of implemented smells
Installing:
pip install good_smell
Usage (Is likely to change when version 1.0 is released):
To issue warnings, good_smell installs itself as a flake8 plugin with error codes starting with SML.
To automatically fix the code use good_smell fix
:
good_smell fix PATH >PATH
good_smell fix PATH [--starting-line STARTING_LINE] [--end-line END_LINE]
Developing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file good_smell-0.18.tar.gz
.
File metadata
- Download URL: good_smell-0.18.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1264d7b7fe9e111113e789cd38d05a896800e3b769125331fde0f3e5d10608e6 |
|
MD5 | 4fcfec8b2daf7373995af3d3524308e8 |
|
BLAKE2b-256 | 9c258e8eca992cd3b69fd1c01a8823ebf969f048383ede208e1ccd1fa841ece8 |
File details
Details for the file good_smell-0.18-py3-none-any.whl
.
File metadata
- Download URL: good_smell-0.18-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eac48332d4b63be17f47c9f7d51014924d2de30bd82e102a61c5630bb4fdf2e5 |
|
MD5 | 78e124f7d294be64392373dcb77dd1ed |
|
BLAKE2b-256 | e3fa16c40b86301cb6b420bd1a64fb30d9d785db0598bc76d9b367577cca872b |