Skip to content

Commit 7e07ac1

Browse files
authored
Merge pull request #29 from softwareone-platform/MPT-17672-add-pre-commit-migrations-check
MPT-17672: add check-migrations hook to pre-commit
2 parents 78d8fa6 + a8e7571 commit 7e07ac1

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ repos:
3333
wemake-python-styleguide==1.5.*,
3434
]
3535

36+
- repo: https://github.com/softwareone-platform/mpt-tool
37+
rev: 5.3.0
38+
hooks:
39+
- id: check-migrations
40+
3641
- repo: https://github.com/pre-commit/mirrors-mypy
3742
rev: v1.19.0
3843
hooks:

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = {text = "Apache-2.0 license"}
1010
dependencies = [
1111
"django==4.2.*",
1212
"mpt-extension-sdk==5.18.*",
13-
"mpt-tool==5.2.*",
13+
"mpt-tool==5.3.*",
1414
]
1515

1616
[project.entry-points."swo.mpt.ext"]
@@ -24,7 +24,6 @@ dev = [
2424
"freezegun==1.5.*",
2525
"ipdb==0.13.*",
2626
"ipython==9.*",
27-
"mpt-tool==5.2.*",
2827
"mypy==1.19.*",
2928
"pre-commit==4.5.*",
3029
"pytest==9.0.*",
@@ -85,6 +84,7 @@ select = ["AAA", "E999", "WPS"]
8584
show-source = true
8685
statistics = false
8786
per-file-ignores = [
87+
"migrations/*.py:WPS102",
8888
"tests/django/settings.py: WPS407",
8989
"settings.py: WPS407",
9090
]
@@ -214,3 +214,7 @@ ignore_missing_imports = true
214214
local_partial_types = true
215215
strict = true
216216
warn_unreachable = true
217+
218+
[[tool.mypy.overrides]]
219+
module = "migrations.*"
220+
disallow_subclassing_any = false

uv.lock

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)