-
Notifications
You must be signed in to change notification settings - Fork 245
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
Reformat to use spaces instead of tabs #745
Conversation
We should document how to preserve blame and probably reformat with black while we're here. |
Should this be documented in the commit message? Or the README? Elsewhere? |
A git configuration section in the README would be nice. Unfortunately, there's no support in github yet. |
Ok, i can update the README no prob. |
Ideally, we'd have some kind of commit hook to automate normalization of formatting. I suggested black, but an autopep8 commit hook could also suffice. |
We need PRs to fail if there are any formatting changes needed, like for pylint. |
So add a GitHub action that checks this? |
The following command was used to reformat: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . black was run as `black .`, using the default configurations Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
fa52c22
to
32fc978
Compare
Yes, please do. Thanks! |
Done. Here's what's included in this PR now:
|
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com>
74c501a
to
597fd70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
|
||
Contributions are always welcome! We've started using | ||
[black](https://pypi.org/project/black/) to format the code base. Please make | ||
sure you run it against any PR's prior to submitting (otherwise we'll probably |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure you run it against any PR's prior to submitting (otherwise we'll probably | |
sure you run it against any PRs prior to submitting (otherwise we'll probably |
Contributing | ||
============ | ||
|
||
Contributions are always welcome! We've started using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributions are always welcome! We've started using | |
Contributions are always welcome! We use |
black --check --diff . | ||
``` | ||
|
||
To ignore commit 1bb64ff452 - which is a massive commit that simply formatted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ignore commit 1bb64ff452 - which is a massive commit that simply formatted | |
To ignore exclusively reformatting commits (listed within ```.gitignorerevs```), you can do the following: |
``` | ||
|
||
To ignore commit 1bb64ff452 - which is a massive commit that simply formatted | ||
the code base using black - you can do the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code base using black - you can do the following: |
The following command was used to reformat:
autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r .
The test suite was ran afterwards and everything seems to pass.
Signed-off-by: Wolfgang E. Sanyer WolfgangESanyer@gmail.com