Skip to content

Commit 2ab28c0

Browse files
Investigamerloonghao
authored andcommitted
test(pre-commit): Add black formatting step to pre-commit
Removed double-quote-string-fixer since this conflicts with black's formatting rules Signed-off-by: MrTeferi <freethoughtleft@gmail.com>
1 parent ed73783 commit 2ab28c0

File tree

2 files changed

+56
-52
lines changed

2 files changed

+56
-52
lines changed

.pre-commit-config.yaml

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
11
exclude: conf.py
22
repos:
3-
- hooks:
4-
- id: trailing-whitespace
5-
- id: end-of-file-fixer
6-
- id: check-docstring-first
7-
- id: check-json
8-
- id: check-yaml
9-
- id: debug-statements
10-
- id: name-tests-test
11-
- id: requirements-txt-fixer
12-
- id: double-quote-string-fixer
13-
repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v2.4.0
15-
- hooks:
16-
- additional_dependencies:
17-
- flake8-typing-imports==1.5.0
18-
id: flake8
19-
repo: https://github.com/pycqa/flake8
20-
rev: 3.7.9
21-
- hooks:
22-
- id: autopep8
23-
repo: https://github.com/pre-commit/mirrors-autopep8
24-
rev: v1.4.4
25-
- hooks:
26-
- id: validate_manifest
27-
repo: https://github.com/pre-commit/pre-commit
28-
rev: v1.21.0
29-
- hooks:
30-
- args:
31-
- --py36-plus
32-
id: pyupgrade
33-
repo: https://github.com/asottile/pyupgrade
34-
rev: v1.25.3
35-
- hooks:
36-
- args:
37-
- --py3-plus
38-
id: reorder-python-imports
39-
repo: https://github.com/asottile/reorder_python_imports
40-
rev: v1.9.0
41-
- hooks:
42-
- args:
43-
- --py36-plus
44-
id: add-trailing-comma
45-
repo: https://github.com/asottile/add-trailing-comma
46-
rev: v1.5.0
47-
- hooks:
48-
- id: commitizen
49-
stages:
50-
- commit-msg
51-
repo: https://github.com/commitizen-tools/commitizen
52-
rev: v2.17.8
3+
- repo: https://github.com/ambv/black
4+
rev: 22.12.0
5+
hooks:
6+
- id: black
7+
language_version: python3.10
8+
- hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
- id: check-docstring-first
12+
- id: check-json
13+
- id: check-yaml
14+
- id: debug-statements
15+
- id: name-tests-test
16+
- id: requirements-txt-fixer
17+
repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v2.4.0
19+
- hooks:
20+
- additional_dependencies:
21+
- flake8-typing-imports==1.5.0
22+
id: flake8
23+
repo: https://github.com/pycqa/flake8
24+
rev: 3.7.9
25+
- hooks:
26+
- id: autopep8
27+
repo: https://github.com/pre-commit/mirrors-autopep8
28+
rev: v1.4.4
29+
- hooks:
30+
- id: validate_manifest
31+
repo: https://github.com/pre-commit/pre-commit
32+
rev: v1.21.0
33+
- hooks:
34+
- args:
35+
- --py36-plus
36+
id: pyupgrade
37+
repo: https://github.com/asottile/pyupgrade
38+
rev: v1.25.3
39+
- hooks:
40+
- args:
41+
- --py3-plus
42+
id: reorder-python-imports
43+
repo: https://github.com/asottile/reorder_python_imports
44+
rev: v1.9.0
45+
- hooks:
46+
- args:
47+
- --py36-plus
48+
id: add-trailing-comma
49+
repo: https://github.com/asottile/add-trailing-comma
50+
rev: v1.5.0
51+
- hooks:
52+
- id: commitizen
53+
stages:
54+
- commit-msg
55+
repo: https://github.com/commitizen-tools/commitizen
56+
rev: v2.17.8

photoshop/api/save_options/png.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ExportOptionsSaveForWeb(Photoshop):
88
"""Options for exporting Save For Web files."""
99

10-
object_name = 'ExportOptionsSaveForWeb'
10+
object_name = "ExportOptionsSaveForWeb"
1111

1212
def __init__(self):
1313
super().__init__()
@@ -72,7 +72,7 @@ def quality(self, value: int):
7272
class PNGSaveOptions(Photoshop):
7373
"""Options for saving file as PNG."""
7474

75-
object_name = 'PNGSaveOptions'
75+
object_name = "PNGSaveOptions"
7676

7777
def __init__(self, interlaced: bool = False, compression: int = 6):
7878
super().__init__()

0 commit comments

Comments
 (0)