dib-lab / khmer

In-memory nucleotide sequence k-mer counting, filtering, graph traversal and more
http://khmer.readthedocs.io/
Other
749 stars 294 forks source link

Use only one tool for Python code reformatting #1153

Open luizirber opened 9 years ago

luizirber commented 9 years ago

Currently we use pep8 for checking for PEP 8 errors and autopep8 for automatic formatting. autopep8 is catching more errors than pep8, so sometimes make pep8 doesn't report any errors, but make format will change the code.

We can unify and use only autopep8 by modifying the pep8 Makefile target to:

pep8: $(PYSOURCES) $(wildcard tests/*.py)
    autopep8 --recursive --diff --exclude _version.py --ignore E309 \
                setup.py khmer/*.py scripts/*.py tests/*.py oxli/*.py

but this only shows a diff with the errors, not an explanation of the error like pep8 does.

Initial discussion: https://github.com/dib-lab/khmer/pull/1145#discussion_r33968901

bocajnotnef commented 9 years ago

Is there something preventing us from using the same version of pep8 as autopep8, as @mr-c suggested?

luizirber commented 9 years ago

@bocajnotnef updating pep8 won't solve the issue, since pep8 is not reporting the error anyway.