-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
126 lines (112 loc) · 3.54 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
#:schema https://json.schemastore.org/pyproject.json
[project]
name = "maya-attribs"
description = "A Python library for creating Maya Attributes"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
keywords = ["maya", "openmaya"]
authors = [{ name = "Thibaud Gambier" }]
dynamic = ["version"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"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.12",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = ["typing-extensions ; python_version < '3.11'"]
[dependency-groups]
dev = [
{ include-group = "test" },
{ include-group = "cov" },
{ include-group = "mypy" },
]
# mypy = [
# "mypy>=1.4.1",
# "mypy>=1.12.0; python_version > '3.7'",
# "maya-stubs>=0.4.1",
# { include-group = "test" }
# ]
mypy = ["maya-stubs>=0.4.1", { include-group = "test" }]
test = ["pytest>=7.4.4"]
cov = ["coverage>=7.2.7"]
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
local_scheme = "no-local-version"
[tool.pyright]
include = ["src"]
reportMissingModuleSource = false # Can't resolve maya modules sources
[tool.ruff]
src = ["src"]
include = ["src/**/*.py", "tests/**/*.py", "**/pyproject.toml"]
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint]
select = ["ALL"]
pydocstyle.convention = "google"
flake8-tidy-imports.ban-relative-imports = "all"
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"FIX002", # Line contains TODO, consider resolving the issue
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
]
unfixable = [
"ERA001", # Found commented-out code
"F401", # Unused import
]
[tool.ruff.lint.per-file-ignores]
"tests/**/test_*.py" = [
"D103", # Missing docstring in public function
"INP001", # File is part of an implicit namespace package. Add an `__init__.py`
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"PT004", # Fixture does not return anything, add leading underscore
"PT011", # `pytest.raises(...)` is too broad
"S101", # Use of assert detected
]
"tests/**/conftest.py" = [
"INP001", # File is part of an implicit namespace package. Add an `__init__.py`
]
[tool.mypy]
files = ["src", "tests"]
disallow_untyped_defs = true
check_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
show_error_codes = true
# disallow_any_generics = true
# implicit_reexport = false
# enable_incomplete_feature = ["Unpack"]
[[tool.mypy.overrides]]
# The `maya-stubs` package is incomplete
module = "attribs.attributes"
disable_error_code = ["attr-defined"]
[tool.coverage.run]
source = ["src/"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"# pragma: no cover",
"if (False|0|TYPE_CHECKING):",
"if __name__ == ['\"]__main__['\"]:",
# https://github.com/nedbat/coveragepy/issues/970
"@overload",
]
[tool.coverage.paths]
source = ["src/", "*/src"]