-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add pre-commit hooks for autofixing trailing whitespace #15237
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Adopt black and isort | ||
97c5ee99bc98dc475512e549b252b23a6e7e0997 | ||
97c5ee99bc98dc475512e549b252b23a6e7e0997 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -583,4 +583,3 @@ L2: | |
L3: | ||
r7 = box(None, 1) | ||
return r7 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,4 +859,3 @@ L2: | |
r2 = baz(r1) | ||
r3 = CPyTagged_Add(n, r2) | ||
return r3 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -836,4 +836,3 @@ L4: | |
r11 = CPy_NoErrOccured() | ||
L5: | ||
return 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ L0: | |
r0 = object 3 | ||
x = r0 | ||
return x | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,4 +226,4 @@ def test_mixed_comparisons_i64() -> None: | |
y = False | ||
print((y or 0) and True) | ||
[out] | ||
0 | ||
0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
bar_var: str | ||
bar_var: str |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
bar_var = "bar" | ||
bar_var = "bar" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a_var = "a" | ||
a_var = "a" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c_var = "c" | ||
c_var = "c" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a_var = "a" | ||
a_var = "a" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c_var = "c" | ||
c_var = "c" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pkg_typed_var = "pkg_typed" | ||
pkg_typed_var = "pkg_typed" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a_var = "a" | ||
a_var = "a" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
b_var = "b" | ||
b_var = "b" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c_var = "c" | ||
c_var = "c" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pkg_untyped_var = "pkg_untyped" | ||
pkg_untyped_var = "pkg_untyped" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
a_var = "a" | ||
a_var = "a" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
b_var = "b" | ||
b_var = "b" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c_var = "c" | ||
c_var = "c" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
standalone_var = "standalone" | ||
standalone_var = "standalone" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ requires = [ | |
"pybind11==2.9.2", | ||
] | ||
|
||
build-backend = "setuptools.build_meta" | ||
build-backend = "setuptools.build_meta" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ BAR = 0 # type: int | |
[file subdir/mypy.ini] | ||
\[mypy] | ||
files=$MYPY_CONFIG_FILE_DIR/good.py | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ flake8-noqa==1.3.1; python_version >= "3.8" # must match version in .pre-co | |
isort[colors]==5.12.0; python_version >= "3.8" # must match version in .pre-commit-config.yaml | ||
lxml>=4.9.1; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12' | ||
pre-commit | ||
pre-commit-hooks==4.4.0 | ||
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 guess we can add this for consistency, but I don't think people will use pre-commit-hooks as a standalone package. I didn't even know it could be run standalone until now. 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. Yeah, it does seem unlikely that people are going to be manually running |
||
psutil>=4.0 | ||
# pytest 6.2.3 does not support Python 3.10 | ||
pytest>=6.2.4 | ||
|
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.
Maybe we should just run Black on this?
Uh oh!
There was an error while loading. Please reload this page.
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.
Black makes quite a few change if I apply this diff to our
pyproject.toml
file:I'm happy to consider doing that, but maybe that should be left for another PR? Feels like running these new hooks on our
test-data/
files and running black on ourtest-data/
files aren't really mutually exclusive.