Skip to main content

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

Build Code style: black PyPi version


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

See contributing guide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for good-smell, version 0.17
Filename, size File type Python version Upload date Hashes
Filename, size good_smell-0.17-py3-none-any.whl (11.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size good_smell-0.17.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page