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

Multi: remove indentation tabs #20

Merged
merged 1 commit into from
Nov 29, 2019
Merged

Multi: remove indentation tabs #20

merged 1 commit into from
Nov 29, 2019

Conversation

teknico
Copy link
Collaborator

@teknico teknico commented Nov 20, 2019

Also remove trailing whitespace and add/remove empty lines at EOF, but only from files that had tabs removed anyway. Fixes #19.

Only whitespace changes intended, hopefully it's not breaking anything.

Sorry for the large diff, feel free to merge #7 and #18 first and I’ll rebase on top of their commits.

@teknico teknico changed the title Remove indentation tabs from Python code and from a README. Multi: remove indentation tabs from Python code and from a README Nov 21, 2019
@buck54321
Copy link
Member

Thanks for waiting, @teknico. Rebase when you get a chance.

@teknico teknico changed the title Multi: remove indentation tabs from Python code and from a README Multi: remove indentation tabs Nov 27, 2019
@teknico
Copy link
Collaborator Author

teknico commented Nov 27, 2019

Done, all tests still pass using both pytest and python3 -m unittest discover. {The former also suppresses stdout by default, which is nice.)

@JoeGruffins
Copy link
Member

I got slightly different results with black:
https://github.com/teknico/tinydecred/compare/remove-tabs...JoeGruffins:compare?expand=1
But I still have syntax errors according to flake8:
https://github.com/JoeGruffins/tinydecred/commit/4c53eb2ddb1a76c7d0f2e3b556925bf6f12818dc/checks?check_suite_id=332569714

Was this done with flake8 or something else? BY HAND!??!$%#$

Yours has removed almost all of the tab errors, but I still see four in app.py

./app.py:91:8: W191 indentation contains tabs
./app.py:91:8: E101 indentation contains mixed spaces and tabs
./app.py:95:8: W191 indentation contains tabs
./app.py:95:8: E101 indentation contains mixed spaces and tabs

@teknico
Copy link
Collaborator Author

teknico commented Nov 28, 2019

I got slightly different results with black

Black is not the right tool for this job because it does not remove all the tabs, and it also makes other changes that I didn't want; this PR is too large already.

But I still have syntax errors according to flake8

Which style changes to make, according to which tool, and how to configure it is best handled in another PR.

Was this done with flake8 or something else? BY HAND!??!$%#$

Flake8 only points out problems, it does not fix them. And well, not entirely by hand. 😉

The Midnight Commander editor usefully highlights tabs and trailing blanks: I used it to search and replace tabs in each file that had them, then used Sublime Text 3 only on those files to remove trailing blanks.

Yours has removed almost all of the tab errors, but I still see four in app.py

Good catch, thanks, fixing those too.

Also remove trailing whitespace and add empty lines at EOF, but only
from the files that had tabs removed anyway.
Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Member

@buck54321 buck54321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@buck54321 buck54321 merged commit 651626e into decred:master Nov 29, 2019
@teknico teknico deleted the remove-tabs branch November 29, 2019 13:32
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.

Multi: mixed indentation characters
3 participants