| 1 |
|
| 2 |
[project] |
| 3 |
name = "anytree" |
| 4 |
dynamic = ["version"] |
| 5 |
description = "Powerful and Lightweight Python Tree Data Structure with various plugins" |
| 6 |
authors = [{ name = "c0fec0de", email = "[email protected]" }] |
| 7 |
dependencies = [] |
| 8 |
requires-python = ">=3.9.2,<4.0" |
| 9 |
readme = "README.rst" |
| 10 |
license = "Apache-2.0" |
| 11 |
keywords = ["tree", "tree data", "treelib", "tree walk", "tree structure"] |
| 12 |
|
| 13 |
classifiers = [ |
| 14 |
"Topic :: Software Development :: Libraries :: Python Modules", |
| 15 |
"Development Status :: 5 - Production/Stable", |
| 16 |
"Programming Language :: Python :: 3.9", |
| 17 |
"Programming Language :: Python :: 3.10", |
| 18 |
"Programming Language :: Python :: 3.11", |
| 19 |
"Programming Language :: Python :: 3.12", |
| 20 |
"Programming Language :: Python :: 3.13", |
| 21 |
] |
| 22 |
|
| 23 |
[project.urls] |
| 24 |
"Homepage" = "https://github.com/c0fec0de/anytree" |
| 25 |
"Documentation" = "https://anytree.readthedocs.io/en/stable/" |
| 26 |
"Bug Tracker" = "https://github.com/c0fec0de/anytree/issues" |
| 27 |
|
| 28 |
[dependency-groups] |
| 29 |
dev = [ |
| 30 |
"coveralls>=3.3.1", |
| 31 |
"mypy>=1.9.0", |
| 32 |
"pytest-cov>=5.0.0", |
| 33 |
"ruff>=0.11.2", |
| 34 |
"pre-commit>=4.2.0", |
| 35 |
"sphinx>=5.3.0", |
| 36 |
"sphinx-rtd-theme>=2.0.0", |
| 37 |
"sphinxemoji>=0.3.1", |
| 38 |
"test2ref>=0.4.2", |
| 39 |
] |
| 40 |
|
| 41 |
[build-system] |
| 42 |
requires = ["pdm-backend"] |
| 43 |
build-backend = "pdm.backend" |
| 44 |
|
| 45 |
[tool.pdm.build] |
| 46 |
includes = ["src/anytree"] |
| 47 |
|
| 48 |
[tool.pdm.version] |
| 49 |
source = "scm" |
| 50 |
fallback_version = "0.0.0" |
| 51 |
|
| 52 |
[tool.ruff] |
| 53 |
line-length = 120 |
| 54 |
fix = true |
| 55 |
target-version = "py37" |
| 56 |
|
| 57 |
[tool.ruff.lint] |
| 58 |
select = [ |
| 59 |
# isort |
| 60 |
"I", |
| 61 |
# pyflakes |
| 62 |
"F", |
| 63 |
# pycodestyle |
| 64 |
"E", |
| 65 |
"W", |
| 66 |
# pydocstyle |
| 67 |
"D", |
| 68 |
# pep8-naming |
| 69 |
"N", |
| 70 |
# flake8-2020 |
| 71 |
"YTT", |
| 72 |
# flake8-bugbear |
| 73 |
"B", |
| 74 |
# flake8-quotes |
| 75 |
"Q", |
| 76 |
# flake8-debugger |
| 77 |
"T10", |
| 78 |
# flake8-gettext |
| 79 |
"INT", |
| 80 |
# pylint |
| 81 |
"PL", |
| 82 |
# misc lints |
| 83 |
"PIE", |
| 84 |
# flake8-pyi |
| 85 |
# "PYI", |
| 86 |
# tidy imports |
| 87 |
"TID", |
| 88 |
# implicit string concatenation |
| 89 |
"ISC", |
| 90 |
# type-checking imports |
| 91 |
"TC", |
| 92 |
# comprehensions |
| 93 |
# "C", |
| 94 |
"C4", |
| 95 |
# pygrep-hooks |
| 96 |
"PGH", |
| 97 |
# Ruff-specific rules |
| 98 |
"RUF", |
| 99 |
# flake8-bandit: exec-builtin |
| 100 |
"S102", |
| 101 |
# numpy-legacy-random |
| 102 |
"NPY002", |
| 103 |
# Perflint |
| 104 |
# "PERF", |
| 105 |
# flynt |
| 106 |
"FLY", |
| 107 |
# flake8-logging-format |
| 108 |
"G", |
| 109 |
# pyupgrade |
| 110 |
"UP", |
| 111 |
# annotation |
| 112 |
# "ANN" |
| 113 |
# bandit |
| 114 |
# "S", |
| 115 |
# Argument |
| 116 |
# "ARG", |
| 117 |
# Pathlib |
| 118 |
# "PTH", |
| 119 |
# Simplify |
| 120 |
# "SIM", |
| 121 |
# Return |
| 122 |
"RET", |
| 123 |
# Raise |
| 124 |
"RSE", |
| 125 |
] |
| 126 |
ignore = [ |
| 127 |
# too-many-arguments |
| 128 |
'PLR0913', |
| 129 |
# Ambiguous doc |
| 130 |
"D100", |
| 131 |
"D101", |
| 132 |
'D203', |
| 133 |
'D212', |
| 134 |
'D402', |
| 135 |
'D406', |
| 136 |
# Multiline doc is ok. |
| 137 |
'D200', |
| 138 |
# We use the class for constructor doc |
| 139 |
'D107', |
| 140 |
# Magic Method Documentation is optional |
| 141 |
'D105', |
| 142 |
# We use faster isinstance checks |
| 143 |
'UP038', |
| 144 |
# Assert |
| 145 |
'S101', |
| 146 |
# Type-Checking |
| 147 |
'TC001', |
| 148 |
# Indent of doctest |
| 149 |
'D412', |
| 150 |
# unused loop |
| 151 |
'B007', |
| 152 |
] |
| 153 |
[tool.ruff.lint.per-file-ignores] |
| 154 |
"tests/*" = [ |
| 155 |
# Magic Values |
| 156 |
"PLR2004", |
| 157 |
# Argument |
| 158 |
"ARG001", |
| 159 |
# doc |
| 160 |
"D100", |
| 161 |
"D101", |
| 162 |
"D102", |
| 163 |
"D103", |
| 164 |
# Unused variables |
| 165 |
"F841", |
| 166 |
# complexity |
| 167 |
'PLR0915', |
| 168 |
] |
| 169 |
|
| 170 |
[tool.ruff.lint.pydocstyle] |
| 171 |
convention = "google" |
| 172 |
|
| 173 |
[tool.pytest.ini_options] |
| 174 |
filterwarnings = [ |
| 175 |
"ignore::DeprecationWarning", |
| 176 |
] |
| 177 |
addopts = """ |
| 178 |
--cov src/anytree |
| 179 |
--cov-report term |
| 180 |
--cov-report html |
| 181 |
--doctest-glob=docs/*.rst |
| 182 |
--doctest-modules |
| 183 |
--ignore-glob=tests/testdata/* |
| 184 |
--log-level=INFO |
| 185 |
--junitxml=report.xml |
| 186 |
""" |
| 187 |
|
| 188 |
[tool.coverage.report] |
| 189 |
exclude_lines = [ |
| 190 |
'return NotImplemented', |
| 191 |
'raise NotImplementedError', |
| 192 |
'pragma: no cover', |
| 193 |
'assert False', |
| 194 |
] |
| 195 |
|
| 196 |
[tool.mypy] |
| 197 |
disable_error_code = "misc" |
| 198 |
ignore_missing_imports = true |