Skip to content

Commit fe43575

Browse files
authored
Moved black to pre-commit (#40)
* Moved black to pre-commit
1 parent 20017fe commit fe43575

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ repos:
1818
rev: '6.0.0'
1919
hooks:
2020
- id: flake8
21+
22+
- repo: https://github.com/psf/black
23+
rev: 22.12.0
24+
hooks:
25+
- id: black
26+
args: [--skip-string-normalization]

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length = 119
3-
target-version = ['py39']
3+
target-version = ['py38']
44
include = '\.pyi?$'
55
extend-exclude = '''
66
(
@@ -38,7 +38,6 @@ mock = "^5.0"
3838
pytest = "^7.2"
3939
pytest-cov = "^4.0"
4040
pytest-django = "^4.5"
41-
black = "^22.12.0"
4241
pre-commit = "^2.21.0"
4342

4443

tests/test_fields.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,7 @@ def test_schema_validation():
115115
field = obj._meta.get_field('invalid_json_schema_field')
116116
errors = field.check()
117117
assert len(errors) == 1
118-
assert errors[0].msg == "JSON schema is not valid: properties.test_field.type: 'incorrect' is not valid under " \
119-
'any of the given schemas'
118+
assert (
119+
errors[0].msg == "JSON schema is not valid: properties.test_field.type: 'incorrect' is not valid under "
120+
'any of the given schemas'
121+
)

0 commit comments

Comments
 (0)