Skip to content

Commit

Permalink
Refactor (formatter): add support for yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Mar 28, 2023
1 parent 735b183 commit e87f318
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@ repos:
hooks:
- id: isort
name: isort (python)


- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0 # Use the sha / tag you want to point at
hooks:
- id: yapf
args: ["-i"]
additional_dependencies: [toml]
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[tool.isort]
profile = "google"
line_length = 100

[tool.yapf]
based_on_style= "google"
column_limit = 100
SPLIT_BEFORE_DICT_SET_GENERATOR = false
SPLIT_BEFORE_CLOSING_BRACKET = false
BLANK_LINE_BEFORE_MODULE_DOCSTRING = true
SPACES_AROUND_POWER_OPERATOR = true
SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES = true
SPLIT_BEFORE_FIRST_ARGUMENT = true
SPLIT_BEFORE_DOT = true
COALESCE_BRACKETS = true

0 comments on commit e87f318

Please sign in to comment.