Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken formatting: reformat everything with black #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mruffalo
Copy link

@mruffalo mruffalo commented May 5, 2020

The code formatting in SnapTools has some issues. This is not a stylistic opinion -- parts of the package are broken due to code formatting. Specifically, mixing tabs and spaces for indentation is not permitted under Python 3, which makes some parts of the code impossible to run (or even import):

Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import snaptools
>>> snaptools.__version__
'1.4.8'
>>> from snaptools.alignment import filter_fastq
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mruffalo/.opt/python3.8-venv/lib/python3.8/site-packages/snaptools/alignment.py", line 79
    print("error: no barcode is selected")
                                         ^
TabError: inconsistent use of tabs and spaces in indentation

It isn't a good use of anyone's time to fix code formatting by hand, and everyone has a slightly different opinion about good style. Let's be neutral and defer to the black code formatter: https://pypi.org/project/black/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant