black: Reformat skipping string normalization.

This commit is contained in:
PIG208 2021-05-28 17:03:46 +08:00 committed by Tim Abbott
parent 5580c68ae5
commit fba21bb00d
178 changed files with 6562 additions and 4469 deletions

View file

@ -12,6 +12,7 @@ EXCLUDED_FILES = [
'zulip/integrations/perforce/git_p4.py',
]
def run() -> None:
parser = argparse.ArgumentParser()
add_default_linter_arguments(parser)
@ -19,15 +20,23 @@ def run() -> None:
linter_config = LinterConfig(args)
by_lang = linter_config.list_files(file_types=['py', 'sh', 'json', 'md', 'txt'],
exclude=EXCLUDED_FILES)
by_lang = linter_config.list_files(
file_types=['py', 'sh', 'json', 'md', 'txt'], exclude=EXCLUDED_FILES
)
linter_config.external_linter('mypy', [sys.executable, 'tools/run-mypy'], ['py'], pass_targets=False,
description="Static type checker for Python (config: mypy.ini)")
linter_config.external_linter('flake8', ['flake8'], ['py'],
description="Standard Python linter (config: .flake8)")
linter_config.external_linter('gitlint', ['tools/lint-commits'],
description="Git Lint for commit messages")
linter_config.external_linter(
'mypy',
[sys.executable, 'tools/run-mypy'],
['py'],
pass_targets=False,
description="Static type checker for Python (config: mypy.ini)",
)
linter_config.external_linter(
'flake8', ['flake8'], ['py'], description="Standard Python linter (config: .flake8)"
)
linter_config.external_linter(
'gitlint', ['tools/lint-commits'], description="Git Lint for commit messages"
)
@linter_config.lint
def custom_py() -> int:
@ -45,5 +54,6 @@ def run() -> None:
linter_config.do_lint()
if __name__ == '__main__':
run()