Format docs/ and scripts/ in CI (#4348)

This commit is contained in:
Jelle Zijlstra 2024-05-04 13:26:36 -07:00 committed by GitHub
parent f22b2437d5
commit c801cd60b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -12,9 +12,10 @@ include = '\.pyi?$'
extend-exclude = ''' extend-exclude = '''
/( /(
# The following are specific to Black, you probably don't want those. # The following are specific to Black, you probably don't want those.
tests/data tests/data/
| profiling | profiling/
)/ | scripts/generate_schema.py # Uses match syntax
)
''' '''
# We use the unstable style for formatting Black itself. If you # We use the unstable style for formatting Black itself. If you
# want bug-free formatting, you should keep this off. If you want # want bug-free formatting, you should keep this off. If you want

View File

@ -51,7 +51,7 @@ def blackify(base_branch: str, black_command: str, logger: logging.Logger) -> in
"diff", "diff",
"--binary", "--binary",
"--find-copies", "--find-copies",
f"{last_commit}-black..{commit}-black" f"{last_commit}-black..{commit}-black",
], ],
stdout=PIPE, stdout=PIPE,
) )

View File

@ -95,7 +95,7 @@ setenv = PYTHONPATH = {toxinidir}/src
skip_install = True skip_install = True
commands = commands =
pip install -e . pip install -e .
black --check {toxinidir}/src {toxinidir}/tests black --check {toxinidir}/src {toxinidir}/tests {toxinidir}/docs {toxinidir}/scripts
[testenv:generate_schema] [testenv:generate_schema]
setenv = PYTHONWARNDEFAULTENCODING = setenv = PYTHONWARNDEFAULTENCODING =