Commit Graph

13 Commits

Author SHA1 Message Date
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Richard Belleville 468768865b
Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
Richard Belleville 65d14904e4 Add todo about deduping 2020-08-14 16:36:08 -07:00
Richard Belleville 13fa5040ca Sometimes, copyright headers can cause test failures 2020-08-10 15:12:13 -07:00
Richard Belleville b50110b583 Fix Windows 2020-08-10 14:49:48 -07:00
Richard Belleville 2d9e8bc736 Copyright 2020-08-06 17:24:28 -07:00
Richard Belleville 60f88e20a4 Fix bazel grpc_tools test 2020-08-06 17:04:22 -07:00
Richard Belleville 9448150eec Remove option to specify path 2020-07-17 16:46:38 -07:00
Richard Belleville 999bbf1401 Format 2020-07-15 13:09:53 -07:00
Richard Belleville fd0d0f77df Fix Bazel warning 2020-07-15 13:03:16 -07:00
Richard Belleville d4e8d9956c Run tests under setup.py 2020-06-26 12:11:31 -07:00
Richard Belleville 5f5402505e Rehome grpc_tools tests 2019-12-10 15:16:21 -08:00