@@ -3,7 +3,7 @@ name = "xcp-ng-tests"
33version = " 0.1.0"
44description = " Testing scripts for XCP-ng"
55readme = " README.md"
6- requires-python = " ~ =3.11"
6+ requires-python = " > =3.11"
77dependencies = [
88 " cryptography>=3.3.1" ,
99 " gitpython" ,
@@ -21,6 +21,7 @@ dev = [
2121 " bs4>=0.0.1" ,
2222 " mypy" ,
2323 " flake8" ,
24+ " flake8-pyproject" ,
2425 " pydocstyle" ,
2526 " pyright" ,
2627 " pyyaml>=6.0" ,
@@ -42,17 +43,38 @@ quote-style = "preserve"
4243
4344[tool .ruff .lint ]
4445select = [
46+ " D" , # pydocstyle
4547 " F" , # Pyflakes
4648 " I" , # isort
4749 " SLF" , # flake8-self
4850 " SIM" , # flake8-simplify
4951]
50- # don't use some of the SIM rules
52+ # don't use some of the default D and SIM rules
5153ignore = [
54+ " D100" , # undocumented-public-module
55+ " D101" , # undocumented-public-class
56+ " D102" , # undocumented-public-method
57+ " D103" , # undocumented-public-function
58+ " D104" , # undocumented-public-package
59+ " D105" , # undocumented-magic-method
60+ " D106" , # undocumented-public-nested-class
61+ " D107" , # undocumented-public-init
62+ " D200" , # unnecessary-multiline-docstring
63+ " D203" , # incorrect-blank-line-before-class
64+ " D204" , # incorrect-blank-line-after-class
65+ " D205" , # missing-blank-line-after-summary
66+ " D210" , # surrounding-whitespace
67+ " D212" , # incorrect-blank-line-before-class
68+ " D400" , # missing-trailing-period
69+ " D401" , # non-imperative-mood
70+ " D403" , # first-word-uncapitalized
5271 " SIM105" , # suppressible-exception
5372 " SIM108" , # if-else-block-instead-of-if-exp
5473]
5574
75+ # restrict to the PEP 257 rules
76+ pydocstyle.convention = " pep257"
77+
5678[tool .ruff .lint .extend-per-file-ignores ]
5779# pytest requires some import and function arguments to match, but
5880# the linter doesn't know that
@@ -76,3 +98,16 @@ section-order = [
7698 " local-folder" ,
7799 " typing" ,
78100]
101+
102+ # ruff doesn't provide all the pycodestyle rules, and pycodestyle is not well
103+ # supported by some IDEs, so we use flake8 for that
104+ [tool .flake8 ]
105+ max-line-length = 120
106+ ignore = [
107+ " E261" , # At least two spaces before inline comment
108+ " E302" , # Expected 2 blank lines, found 0
109+ " E305" , # Expected 2 blank lines after end of function or class
110+ " W503" , # Line break occurred before a binary operator
111+ " F" , # already done by ruff
112+ ]
113+ exclude =[" .git" , " .venv" , " data.py" , " vm_data.py" ]
0 commit comments