-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit and bunch of autofixes support (#2034)
- Loading branch information
Showing
8 changed files
with
175 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
root = true | ||
|
||
[*] | ||
# TODO: Activate and run in a different PR. Lots of files affected | ||
# trim_trailing_whitespace = true | ||
# insert_final_newline = true | ||
# end_of_line = crlf | ||
indent_style = space | ||
indent_size = 4 | ||
max_line_length = 120 # Same as .clang-format | ||
|
||
[*.py] | ||
max_line_length = 88 # Same as Black | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yaml,yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[isort] | ||
py_version=37 | ||
py_version = 37 | ||
profile = black | ||
combine_as_imports = true | ||
skip = setup.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# You can run this locally with `pre-commit run [--all]` | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
# TODO: Activate and run in a different PR. Lots of files affected | ||
# - id: trailing-whitespace | ||
# args: [--markdown-linebreak-ext=md] | ||
# - id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [--fix=crlf] | ||
# Vendored | ||
exclude: ^com/win32comext/mapi/src/mapi_headers/.*$ | ||
- id: check-case-conflict | ||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.12.0 | ||
hooks: | ||
- id: pretty-format-toml | ||
args: [--autofix, --trailing-commas] | ||
- id: pretty-format-yaml | ||
args: [--autofix, --indent, "2", --offset, "2", --preserve-quotes] | ||
- id: pretty-format-ini | ||
args: [--autofix] | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v2.4.0 | ||
hooks: | ||
- id: pycln | ||
args: [--config=pycln.toml] | ||
verbose: true | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
verbose: true | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.2.0 | ||
hooks: | ||
- id: black | ||
verbose: true | ||
|
||
ci: | ||
autoupdate_schedule: quarterly |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
[info] | ||
drivername=PipeServicePerf | ||
symbolfile=perf_install.h | ||
drivername = PipeServicePerf | ||
symbolfile = perf_install.h | ||
|
||
[languages] | ||
009=English | ||
009 = English | ||
|
||
[text] | ||
SERVICE_009_NAME=Python Demo Service | ||
SERVICE_009_HELP=Shows performance statistics for the sample Python service | ||
HEARTBEAT_009_NAME=Heartbeat pulse | ||
HEARTBEAT_009_HELP=Regular counter to indicate the service is alive. Useful so system monitors can detect health even under low loads. | ||
READ_009_NAME=Bytes read/sec | ||
READ_009_HELP=Number of bytes read in total | ||
WRITE_009_NAME=Bytes written/sec | ||
WRITE_009_HELP=Number of bytes written in total | ||
THREADS_009_NAME=Number of threads | ||
THREADS_009_HELP=Number of threads currently servicing client connections | ||
SERVICE_009_NAME = Python Demo Service | ||
SERVICE_009_HELP = Shows performance statistics for the sample Python service | ||
HEARTBEAT_009_NAME = Heartbeat pulse | ||
HEARTBEAT_009_HELP = Regular counter to indicate the service is alive. Useful so system monitors can detect health even under low loads. | ||
READ_009_NAME = Bytes read/sec | ||
READ_009_HELP = Number of bytes read in total | ||
WRITE_009_NAME = Bytes written/sec | ||
WRITE_009_HELP = Number of bytes written in total | ||
THREADS_009_NAME = Number of threads | ||
THREADS_009_HELP = Number of threads currently servicing client connections |