forked from GispoCoding/pytest-qgis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
130 lines (106 loc) · 3.43 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "pytest-qgis"
authors = [{ name = "Gispo Ltd.", email = "[email protected]" }]
maintainers = [{ name = "Gispo Ltd.", email = "[email protected]" }]
description = "A pytest plugin for testing QGIS python plugins"
readme = "README.md"
dynamic = ["version"]
keywords = ["pytest", "qgis", "QGIS", "PyQGIS"]
requires-python = ">=3.7"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
]
dependencies = ["pytest >= 6.0"]
[project.urls]
homepage = "https://github.com/GispoCoding/pytest-qgis"
repository = "https://github.com/GispoCoding/pytest-qgis"
changelog = "https://github.com/GispoCoding/pytest-qgis/CHANGELOG.md"
[project.entry-points.pytest11]
pytest_qgis = "pytest_qgis"
[tool]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.dynamic]
version = { attr = "pytest_qgis._version.__version__" }
[tool.setuptools.package-data]
pytest_qgis = ["py.typed"]
[tool.pytest.ini_options]
doctest_encoding = "utf-8"
markers = [
"with_pytest_qt: these tests require pytest-qt (deselect with '-m \"with_pytest_qt\"')"
]
[tool.isort]
profile = "black"
multi_line_output = 3
[tool.mypy]
disable_error_code = "misc"
ignore_missing_imports = true
follow_imports = "silent"
show_column_numbers = true
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py37"
external = ["QGS"]
[tool.ruff.lint]
select = [
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C", # flake8-comprehensions
"C90", # flake8, mccabe
"E", # flake8, pycodestyle
"F", # flake8, Pyflakes
"I", # isort
"INP", # flake8-no-pep420
"N", # pep8-naming
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PL", # pylint
"PT", # flake8-pytest-style
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"T", # flake8-print
"ICN", # flake8-import-conventions
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"W", # flake8, pycodestyle
"UP", # pyupgrade
]
ignore = [
"ANN101", # Missing type annotation for `self` in method
"PT004" # Fixture does not return anything, add leading underscore
]
unfixable = [
"F401", # Unused imports
"F841", # Unused variables
]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
"src/pytest_qgis/pytest_qgis.py"=["PLR2004"] # TODO: Fix magic values. Remove this after.
"src/pytest_qgis/qgis_interface.py" = ["N802", "N803"]
"tests/*" = [
"ANN001",
"ANN201",
"ARG001", # TODO: Unused function argument. These are mostly pytest fixtures. Find a way to allow these in tests. Remove this after.
]