-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
148 lines (129 loc) · 3.5 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#:schema https://json.schemastore.org/pyproject.json
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pyforce-p4"
description = "Python wrapper for Perforce p4 command-line client"
readme = "README.md"
license = "MIT"
authors = [{ name = "Thibaud Gambier" }]
requires-python = ">=3.7"
dependencies = ["pydantic", "typing_extensions"]
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",
"Typing :: Typed",
]
[project.urls]
Github = "https://github.com/tahv/pyforce"
Changelog = "https://pyforce.readthedocs.io/latest/changelog.html"
Documentation = "https://pyforce.readthedocs.io/latest"
[project.optional-dependencies]
tests = ["pytest", "coverage"]
style = ["ruff"]
mypy = ["mypy", "pytest"]
docs = [
"sphinx",
"sphinx-autobuild",
"furo",
"myst-parser",
"autodoc_pydantic",
"enum_tools[sphinx]",
]
dev = ["pyforce-p4[tests,style,mypy,docs]"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
[tool.hatch.build.targets.wheel]
packages = ["src/pyforce"]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
testpaths = ["src", "tests"]
[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__['\"]:",
]
[tool.coverage.paths]
source = ["src/", "*/src"]
[tool.mypy]
plugins = ["pydantic.mypy"]
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
[tool.pydantic-mypy]
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff]
src = ["src", "tests"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# ANN101: Missing type annotation for `self` in method
"ANN101",
# ANN102: Missing type annotation for `cls` in classmethod
"ANN102",
# D107: Missing docstring in `__init__`
"D107",
# D105: Missing docstring in magic method
"D105",
# S603: `subprocess` call: check for execution of untrusted input
"S603",
# TD002: Missing author in TODO
"TD002",
# TD003: Missing issue link on the line following this TODO
"TD003",
# FIX002: Line contains TODO, consider resolving the issue
"FIX002",
# Compatibility
# UP006: (3.9) - Use `list` instead of `List` for type annotation
"UP006",
# UP007: (3.10) - Use `X | Y` for type annotations
"UP007",
]
unfixable = [
# ERA001: Found commented-out code
"ERA001",
# F401: Unused import
"F401",
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = [
# PLR2004: Magic value used in comparison, consider replacing with a constant variable
"PLR2004",
# S101: Use of assert detected
"S101",
# S607: Starting a process with a partial executable path
"S607",
]
"__init__.py" = [
# F403: `from ... import *` used; unable to detect undefined names
"F403",
]