22name = " xcp-ng-dev"
33description = " A tool to develop and build XCP-ng packages"
44readme = " README.md"
5- requires-python = " >=3.11"
5+ requires-python = " >=3.11, <4 "
66license = " MIT"
77license-files = [" LICENSE" ]
88dynamic = [" version" ]
99dependencies = [
10- " argcomplete" ,
10+ " argcomplete" ,
11+ ]
12+
13+ [dependency-groups ]
14+ dev = [
15+ " icecream" ,
16+ " mypy" ,
17+ " flake8" ,
18+ " pyright" ,
19+ " ruff" ,
20+ " typing-extensions" ,
21+ " flake8-pyproject" ,
1122]
1223
1324[project .scripts ]
@@ -22,3 +33,77 @@ requires = ["setuptools >= 77.0.3", "setuptools-scm>=8"]
2233build-backend = " setuptools.build_meta"
2334
2435[tool .setuptools_scm ]
36+
37+ [tool .pyright ]
38+ typeCheckingMode = " standard"
39+
40+ [tool .ruff ]
41+ preview = true
42+ line-length = 120
43+ exclude = [" .git" ]
44+
45+ [tool .ruff .format ]
46+ quote-style = " preserve"
47+
48+ [tool .ruff .lint ]
49+ select = [
50+ " D" , # pydocstyle
51+ " F" , # Pyflakes
52+ " I" , # isort
53+ " SLF" , # flake8-self
54+ " SIM" , # flake8-simplify
55+ ]
56+ # don't use some of the default D and SIM rules
57+ ignore = [
58+ " D100" , # undocumented-public-module
59+ " D101" , # undocumented-public-class
60+ " D102" , # undocumented-public-method
61+ " D103" , # undocumented-public-function
62+ " D104" , # undocumented-public-package
63+ " D105" , # undocumented-magic-method
64+ " D106" , # undocumented-public-nested-class
65+ " D107" , # undocumented-public-init
66+ " D200" , # unnecessary-multiline-docstring
67+ " D203" , # incorrect-blank-line-before-class
68+ " D204" , # incorrect-blank-line-after-class
69+ " D205" , # missing-blank-line-after-summary
70+ " D210" , # surrounding-whitespace
71+ " D212" , # incorrect-blank-line-before-class
72+ " D400" , # missing-trailing-period
73+ " D401" , # non-imperative-mood
74+ " D403" , # first-word-uncapitalized
75+ " SIM105" , # suppressible-exception
76+ " SIM108" , # if-else-block-instead-of-if-exp
77+ ]
78+
79+ # restrict to the PEP 257 rules
80+ pydocstyle.convention = " pep257"
81+
82+ [tool .ruff .lint .isort .sections ]
83+ testing = [" pytest*" ]
84+ typing = [" typing" ]
85+
86+ [tool .ruff .lint .isort ]
87+ lines-after-imports = 1
88+ section-order = [
89+ " future" ,
90+ " testing" ,
91+ " standard-library" ,
92+ " third-party" ,
93+ " first-party" ,
94+ " local-folder" ,
95+ " typing" ,
96+ ]
97+
98+ # ruff doesn't provide all the pycodestyle rules, and pycodestyle is not well
99+ # supported by some IDEs, so we use flake8 for that
100+ [tool .flake8 ]
101+ max-line-length = 120
102+ ignore = [
103+ " E261" , # At least two spaces before inline comment
104+ " E302" , # Expected 2 blank lines, found 0
105+ " E305" , # Expected 2 blank lines after end of function or class
106+ " W503" , # Line break occurred before a binary operator
107+ " F" , # already done by ruff
108+ ]
109+ exclude =[" .git" , " .venv" ]
0 commit comments