Commit Graph

16 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
73dcfd375d Fix relative imports for Python 3 (#27971)
* Fix relative imports for Python 3

* Remove space

* isort
2021-11-08 15:37:32 -08:00
Richard Belleville
59693b7e72 Migrate Infrastructure Scripts to Python 3 (#27135)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Migrate tools/distrib directory to python 3

* Remove unnecessary shebang

* Restore line_count directory

* Immediately convert subprocess.check_output output to string

* Take care of Python 2 shebangs

* Invoke scripts using a Python 3 interpreter

* Yapf. Isort

* Try installing Python 3 first

* See if we have any Python 3 versions installed

* Add Python 3.7 to Windows path

* Try adding a symlink

* Try to symlink differently

* Install six for Python 3

* Run run_interop_tests with python 3

* Try installing six in python3.7 explicitly

* Revert "Try installing six in python3.7 explicitly"

This reverts commit 2cf60d72f388a95d642b2c99a775d88a6248f788.

* And debug some more

* Fix issue with jobset.py

* Add debug for CI failure

* Revert microbenchmark changes
2021-11-08 08:55:25 -08:00
Richard Belleville
b6cc72f129 Revert "Run 2to3 on tools directory (#26002)" (#27183)
This reverts commit a388361c3d.
2021-08-30 12:29:20 -07:00
Richard Belleville
a388361c3d Run 2to3 on tools directory (#26002)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Restore line_count directory
2021-08-30 09:25:21 -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
Esun Kim
7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
Alex Polcyn
e52d87b53d Add a grpclb-in-DNS interop test suite 2018-10-23 00:00:08 -07:00
Mehrdad Afshari
87cd994b04 Upgrade yapf to 0.20.0
Upgrade yapf version to 0.20.0 and reformat Python files.
2018-01-02 14:40:00 -08:00
ncteisen
05687c3da9 yapf tools/run_tests/python_utils 2017-12-11 16:54:47 -08:00
Jan Tattermusch
7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Eric Gribkoff
2f59cf2dc3 move health check to just before running test cases 2017-03-17 00:46:01 -07:00
Eric Gribkoff
92a5d28a4c increase wait for healthy timeout 2017-03-17 00:46:01 -07:00
Eric Gribkoff
d86a19efd0 check error for docker inspect 2017-03-17 00:46:01 -07:00
Eric Gribkoff
22afddf53c add health check for http2 server 2017-03-17 00:46:01 -07:00
Jan Tattermusch
5c79a3199c cleanup tools/run_tests directory 2016-12-22 10:47:52 +01:00