@@ -19,7 +19,11 @@ omit = [
1919]
2020
2121[tool .bandit ]
22- exclude_dirs = [" tests" ]
22+ exclude_dirs = [
23+ " tests" ,
24+ " src/suitable/_module_types.py" ,
25+ " src/suitable/_modules.py" ,
26+ ]
2327skips = [" B101" ]
2428
2529[tool .mypy ]
@@ -34,6 +38,123 @@ mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
3438module = [" suitable._module_types" ]
3539warn_return_any = false
3640
41+ [tool .ruff ]
42+ exclude = [
43+ " .bzr" ,
44+ " .direnv" ,
45+ " .eggs" ,
46+ " .git" ,
47+ " .git-rewrite" ,
48+ " .hg" ,
49+ " .ipynb_checkpoints" ,
50+ " .mypy_cache" ,
51+ " .nox" ,
52+ " .pants.d" ,
53+ " .pyenv" ,
54+ " .pytest_cache" ,
55+ " .pytype" ,
56+ " .ruff_cache" ,
57+ " .svn" ,
58+ " .tox" ,
59+ " .venv" ,
60+ " .vscode" ,
61+ " __pypackages__" ,
62+ " _build" ,
63+ " buck-out" ,
64+ " build" ,
65+ " dist" ,
66+ " node_modules" ,
67+ " site-packages" ,
68+ " venv" ,
69+ ]
70+ src = [" scripts" , " src" , " test" ]
71+ include = [
72+ " pyproject.toml" ,
73+ " scripts/**/*.py" ,
74+ " src/**/*.py" ,
75+ " tests/**/*.py" ,
76+ ]
77+ line-length = 80
78+ indent-width = 4
79+ target-version = " py38"
80+
81+ [tool .ruff .lint ]
82+ select = [
83+ " A005" ,
84+ " ASYNC" ,
85+ " B0" ,
86+ " B904" ,
87+ " B909" ,
88+ " C4" ,
89+ " COM818" ,
90+ " E" ,
91+ " F" ,
92+ " FLY002" ,
93+ " FURB" ,
94+ " G010" ,
95+ " G2" ,
96+ " I002" ,
97+ " ISC" ,
98+ " LOG" ,
99+ " N" ,
100+ " PERF" ,
101+ " PGH004" ,
102+ " PGH005" ,
103+ " PIE" ,
104+ " PYI" ,
105+ " Q" ,
106+ " RUF" ,
107+ " SIM" ,
108+ " SLOT" ,
109+ " T" ,
110+ " UP" ,
111+ " W" ,
112+ ]
113+ ignore = [
114+ " FURB103" ,
115+ " SIM105" ,
116+ " SIM118" ,
117+ ]
118+ unfixable = []
119+ preview = true
120+
121+ [tool .ruff .lint .extend-per-file-ignores ]
122+ "scripts/**/*.py" = [
123+ " T" ,
124+ ]
125+ "tests/**/*.py" = [
126+ " RUF012" ,
127+ " SIM108" ,
128+ ]
129+ "src/suitable/_module*s.py" = [
130+ " PYI041" ,
131+ " RUF100" ,
132+ ]
133+
134+ [tool .ruff .lint .isort ]
135+ required-imports = [" from __future__ import annotations" ]
136+
137+ [tool .ruff .lint .pep8-naming ]
138+ extend-ignore-names = []
139+ classmethod-decorators = []
140+
141+ [tool .ruff .lint .flake8-quotes ]
142+ avoid-escape = true
143+ docstring-quotes = " double"
144+ inline-quotes = " single"
145+ multiline-quotes = " double"
146+
147+ [tool .ruff .lint .pyupgrade ]
148+ keep-runtime-typing = true
149+
150+ [tool .ruff .format ]
151+ quote-style = " single"
152+ indent-style = " space"
153+ skip-magic-trailing-comma = false
154+ line-ending = " lf"
155+ docstring-code-format = true
156+ docstring-code-line-length = " dynamic"
157+
37158[tool .bumpversion ]
38159current_version = " 0.20.3"
39160commit = true
@@ -70,7 +191,8 @@ envlist =
70191 py{39,310,311}-ansible8
71192 py{310,311,312}-ansible9
72193 py{310,311,312}-ansible10
73- flake8
194+ py{311,312,313}-ansible11
195+ ruff
74196 bandit
75197 mypy
76198 report
@@ -79,14 +201,15 @@ envlist =
79201python =
80202 3.8: py38
81203 3.9: py39
82- 3.10: py310,flake8,bandit,mypy
83- 3.11: py311
204+ 3.10: py310
205+ 3.11: py311,ruff,bandit,mypy
84206 3.12: py312
207+ 3.13: py313
85208
86209[testenv]
87210usedevelop = true
88211setenv =
89- py{38,39,310,311,312}: COVERAGE_FILE = .coverage.{envname}
212+ py{38,39,310,311,312,313 }: COVERAGE_FILE = .coverage.{envname}
90213deps =
91214 -e{toxinidir}[tests]
92215 ansible6: ansible==6.*
@@ -99,38 +222,41 @@ deps =
99222 ansible9: ansible-core==2.16.*
100223 ansible10: ansible==10.*
101224 ansible10: ansible-core==2.17.*
225+ ansible11: ansible==11.*
226+ ansible11: ansible-core==2.18.*
102227
103228commands = pytest --cov --cov-report= {posargs}
104229
105230passenv = *
106231
107- [testenv:flake8 ]
108- basepython = python3.10
232+ [testenv:ruff ]
233+ basepython = python3.11
109234skip_install = true
110235deps =
111- flake8
112- flake8-bugbear
113- commands = flake8 src/ tests/
236+ ruff
237+ commands = ruff check
114238
115239[testenv:bandit]
116- basepython = python3.10
240+ basepython = python3.11
117241skip_install = true
118242deps =
119243 bandit[toml]
120244commands = bandit -q -c pyproject.toml -r src
121245
122246[testenv:mypy]
123- basepython = python3.10
247+ basepython = python3.11
124248deps =
125249 -e{toxinidir}
126250 mypy
127251 mitogen
252+ types-paramiko
128253commands =
129- mypy -p suitable --python-version 3.8
130- mypy -p suitable --python-version 3.9
131- mypy -p suitable --python-version 3.10
132- mypy -p suitable --python-version 3.11
133- mypy -p suitable --python-version 3.12
254+ mypy -p suitable -p tests --python-version 3.8
255+ mypy -p suitable -p tests --python-version 3.9
256+ mypy -p suitable -p tests --python-version 3.10
257+ mypy -p suitable -p tests --python-version 3.11
258+ mypy -p suitable -p tests --python-version 3.12
259+ mypy -p suitable -p tests --python-version 3.13
134260
135261[testenv:report]
136262deps =
0 commit comments