Skip to content

Commit 20017fe

Browse files
authored
Moved flake8 to pre-commit. (#39)
1 parent fa0969a commit 20017fe

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ repos:
1313
hooks:
1414
- id: pyupgrade
1515
args: [--py38-plus]
16+
17+
- repo: https://github.com/pycqa/flake8
18+
rev: '6.0.0'
19+
hooks:
20+
- id: flake8

bin/wait_for_it.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ def start_up(self):
6969
except OptionException as err:
7070
print(err)
7171
parser.print_help()
72-
except socket.timeout as err:
72+
except socket.timeout:
7373
logmsg = self.build_log(5, self.app, int(self.options.timeout))
7474
self.log(logmsg)
75-
except ConnectionRefusedError as err:
75+
except ConnectionRefusedError:
7676
logmsg = self.build_log(4, self.app)
7777
self.log(logmsg)
7878

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ django = "^3.2||^4.0"
3535
[tool.poetry.dev-dependencies]
3636
bump2version = "^1.0.1"
3737
mock = "^5.0"
38-
flake8 = "^5.0"
3938
pytest = "^7.2"
4039
pytest-cov = "^4.0"
4140
pytest-django = "^4.5"

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ exclude =
44
django_reactive/migrations,
55
.git,
66
.github,
7-
.tox,
87
build,
98
dist,
10-
.venv,
11-
data
9+
.venv
1210
max-line-length = 119

tests/test_fields.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,5 @@ 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 (
119-
errors[0].msg
120-
== "JSON schema is not valid: properties.test_field.type: 'incorrect' is not valid under any of the given schemas"
121-
)
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'

0 commit comments

Comments
 (0)