-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Blackify some files to show style differences #1186
Changes from all commits
b5935de
ff65d95
e2e53a1
3f70dca
27c276e
547874b
6c4ed24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/python/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
exclude_types: ['markdown', 'ini', 'toml'] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] # PEP 508 specifications. | ||
|
||
|
||
[tool.black] | ||
line-length = 120 | ||
target_version = ['py37', 'py27', 'py36'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove py27? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kept it because we still have py27 support :(. So wasn't comfortable making formatting related this and risk breaking it. I just quickly ran it and the only changes were removing |
||
exclude = ''' | ||
( | ||
/( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also exclude init template directories? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea. sure can do. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have excluded the templates used for |
||
\.eggs # exclude a few common directories in the | ||
| \.git # root of the project | ||
| \.tox | ||
| \.venv | ||
| build | ||
| dist | ||
| pip-wheel-metadata | ||
| samcli/local/init/templates | ||
)/ | ||
) | ||
''' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
coverage==4.3.4 | ||
flake8==3.3.0 | ||
tox==2.2.1 | ||
pytest-cov==2.4.0 | ||
# astroid > 2.0.4 is not compatible with pylint1.7 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
SAM CLI version | ||
""" | ||
|
||
__version__ = '0.21.0' | ||
__version__ = "0.21.0" |
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.
Why isn't
black
run as part ofmake pr
?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
make black
command requires you to commit the changes. So I didn't want themake pr
to run that and make it look like it works. I can add anothermake
command that does the check instead, which is probably what we want anyways.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.
If you install the git hooks, running the check on pr is just redundant. This is because you can't push unless black passes.