forked from businho/django-migrations-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
109 lines (97 loc) · 4.77 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[tool.poetry]
name = "django-migrations-ci-lh"
version = "0.0.1"
description = "Django migrations CI optimization"
authors = ["Iuri de Silvio <[email protected]>"]
readme = "README.md"
packages = [{include = "django_migrations_ci"}]
classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Framework :: Django", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules",]
[tool.poetry.urls]
Homepage = "https://github.com/businho/django-migrations-ci"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry.dependencies]
python = "^3.8"
django = "^4 || ^5"
[tool.poetry.group.dev.dependencies]
mysqlclient = "^2.1.1"
psycopg2 = "^2.9.5"
pytest = "^7.2.0"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
ruff = "*"
[tool.poetry-dynamic-versioning]
enable = true
[tool.pytest.ini_options]
addopts = "--capture=no --cov=django_migrations_ci --cov-report term --cov-report xml"
[tool.poetry.plugins]
pytest11 = { migrateci = "django_migrations_ci.pytest_plugin" }
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing"]
parallel = true
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = true
[tool.mypy]
exclude = [
"example/",
]
plugins = [
"mypy_django_plugin.main",
]
[tool.django-stubs]
django_settings_module = "tests.testapp.settings"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A001", # Variable `exec` is shadowing a Python builtin
"ANN001", # Missing type annotation for function argument `schema_editor`
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**options`
"ANN101", # Missing type annotation for `self` in method
"ANN201", # Missing return type annotation for public function `create_one_bus`
"ANN202", # Missing return type annotation for private function `_setup_logging`
"ANN204", # Missing return type annotation for special method `__init__`
"ARG001", # Unused function argument: `schema_editor`
"ARG002", # Unused method argument: `args`
"C901", # `pytest_configure` is too complex
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
"D203", # warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible.
"D213", # warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
"DJ008", # Model does not define `__str__` method
"EM101", # Exception must not use a string literal, assign to variable first
"FBT002", # Boolean default positional argument in function definition
"FBT003", # Boolean positional value in function call
"G004", # Logging statement uses f-string
"N818", # Exception name should be named with an Error suffix
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition (7 > 5)
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison, consider replacing `2` with a constant variable
"PT004", # Fixture does not return anything, add leading underscore
"PT006", # Wrong name(s) type in `@pytest.mark.parametrize`, expected `tuple`
"PT009", # Use a regular `assert` instead of unittest-style `assertEqual`
"PTH104", # `os.rename()` should be replaced by `Path.rename()`
"PTH123", # `open()` should be replaced by `Path.open()`
"S101", # Use of `assert` detected
"S105", # Possible hardcoded password assigned to: "SECRET_KEY"
"S324", # Probable use of insecure hash functions in `hashlib`: `md5`
"S602", # `subprocess` call with `shell=True` identified, security issue
"SIM108", # Use ternary operator `suffix = f"gw{index}" if is_pytest else f"{index + 1}"` instead of `if`-`else`-block
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"SLF001", # Private member accessed
"TRY003", # Avoid specifying long messages outside the exception class
# warning: The following rules may cause conflicts when used with the formatter: `COM812`, `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration.
"COM812", "ISC001",
]
[tool.ruff.lint.extend-per-file-ignores]
"example/app/migrations/*" = ["RUF012"]
"tests/testapp/migrations/*" = ["RUF012"]