1
0
Fork 0

Make black with line length 80 repo's code style

Provide a consistent formatting style and tox commands to lint and
format.

Bug: b/267675342
Change-Id: I33ddfe07af8473f4334c347d156246bfb66d4cfe
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/362954
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Gavin Mak 2023-03-11 04:35:22 +00:00 committed by LUCI
parent 75eb8ea935
commit 1604cf255f
4 changed files with 58 additions and 19 deletions

20
tox.ini
View file

@ -15,7 +15,7 @@
# https://tox.readthedocs.io/
[tox]
envlist = py36, py37, py38, py39, py310
envlist = lint, py36, py37, py38, py39, py310
[gh-actions]
python =
@ -35,5 +35,23 @@ setenv =
GIT_COMMITTER_NAME = Repo test committer
EMAIL = repo@gerrit.nodomain
[testenv:lint]
skip_install = true
deps =
black
flake8
commands =
black --check {posargs:.}
flake8
[testenv:format]
skip_install = true
deps =
black
flake8
commands =
black {posargs:.}
flake8
[pytest]
timeout = 300