Debian Codegraph @

pyproject.toml

raw
1 [build-system]
2 build-backend = "setuptools.build_meta"
3 requires = [ "setuptools>=77" ]
4
5 [project]
6 name = "astroid"
7 description = "An abstract syntax tree for Python with inference support."
8 readme = "README.rst"
9 keywords = [ "abstract syntax tree", "python", "static code analysis" ]
10 license = "LGPL-2.1-OR-later"
11 license-files = [ "LICENSE", "CONTRIBUTORS.txt" ]
12 requires-python = ">=3.10.0"
13 classifiers = [
14 "Development Status :: 6 - Mature",
15 "Environment :: Console",
16 "Intended Audience :: Developers",
17 "Operating System :: OS Independent",
18 "Programming Language :: Python",
19 "Programming Language :: Python :: 3 :: Only",
20 "Programming Language :: Python :: 3.10",
21 "Programming Language :: Python :: 3.11",
22 "Programming Language :: Python :: 3.12",
23 "Programming Language :: Python :: 3.13",
24 "Programming Language :: Python :: 3.14",
25 "Programming Language :: Python :: Implementation :: CPython",
26 "Programming Language :: Python :: Implementation :: PyPy",
27 "Topic :: Software Development :: Libraries :: Python Modules",
28 "Topic :: Software Development :: Quality Assurance",
29 "Topic :: Software Development :: Testing",
30 ]
31 dynamic = [ "version" ]
32 dependencies = [
33 "typing-extensions>=4; python_version<'3.11'",
34 ]
35 urls."Bug tracker" = "https://github.com/pylint-dev/astroid/issues"
36 urls."Discord server" = "https://discord.gg/Egy6P8AMB5"
37 urls.Docs = "https://pylint.readthedocs.io/projects/astroid/en/latest/"
38 urls."Source Code" = "https://github.com/pylint-dev/astroid"
39
40 [tool.setuptools]
41 dynamic.version = { attr = "astroid.__pkginfo__.__version__" }
42 package-dir."" = "."
43 packages.find.include = [ "astroid*" ]
44
45 [tool.ruff]
46 target-version = "py310"
47 # ruff is less lenient than pylint and does not make any exceptions
48 # (for docstrings, strings and comments in particular).
49 line-length = 110
50 extend-exclude = [ "tests/testdata/" ]
51 lint.select = [
52 "B", # bugbear
53 "E", # pycodestyle
54 "F", # pyflakes
55 "I", # isort
56 "RUF", # ruff
57 "UP", # pyupgrade
58 "W", # pycodestyle
59 ]
60 lint.ignore = [
61 "B905", # `zip()` without an explicit `strict=` parameter
62 "F401", # API
63 "RUF100", # ruff does not understand pylint's directive usefulness
64 ]
65 # Ruff is autofixing a tests with a voluntarily sneaky unicode
66 lint.per-file-ignores."tests/test_regrtest.py" = [ "RUF001" ]
67 lint.fixable = [
68 "B", # bugbear
69 "E", # pycodestyle
70 "F", # pyflakes
71 "I", # isort
72 "RUF", # ruff
73 "UP", # pyupgrade
74 "W", # pycodestyle
75 ]
76 lint.unfixable = [ "RUF001" ]
77
78 [tool.pyproject-fmt]
79 max_supported_python = "3.14"
80
81 [tool.pytest]
82 ini_options.addopts = '-m "not acceptance"'
83 ini_options.python_files = [ "*test_*.py" ]
84 ini_options.testpaths = [ "tests" ]
85 ini_options.filterwarnings = "error"
86
87 [tool.mypy]
88 python_version = "3.10"
89 files = [
90 "astroid/_ast.py",
91 "astroid/astroid_manager.py",
92 "astroid/brain/brain_crypt.py",
93 "astroid/brain/brain_ctypes.py",
94 "astroid/brain/brain_curses.py",
95 "astroid/brain/brain_datetime.py",
96 "astroid/brain/brain_dateutil.py",
97 "astroid/brain/brain_hashlib.py",
98 "astroid/brain/brain_http.py",
99 "astroid/brain/brain_hypothesis.py",
100 "astroid/brain/brain_mechanize.py",
101 "astroid/brain/brain_numpy_core_einsumfunc.py",
102 "astroid/brain/brain_numpy_core_fromnumeric.py",
103 "astroid/brain/brain_numpy_core_function_base.py",
104 "astroid/brain/brain_numpy_core_multiarray.py",
105 "astroid/brain/brain_numpy_core_numeric.py",
106 "astroid/brain/brain_numpy_core_numerictypes.py",
107 "astroid/brain/brain_numpy_core_umath.py",
108 "astroid/brain/brain_numpy_ma.py",
109 "astroid/brain/brain_numpy_random_mtrand.py",
110 "astroid/brain/brain_pkg_resources.py",
111 "astroid/brain/brain_pytest.py",
112 "astroid/brain/brain_responses.py",
113 "astroid/brain/brain_scipy_signal.py",
114 "astroid/brain/brain_sqlalchemy.py",
115 "astroid/brain/brain_ssl.py",
116 "astroid/brain/brain_subprocess.py",
117 "astroid/brain/brain_threading.py",
118 "astroid/brain/brain_unittest.py",
119 "astroid/brain/brain_uuid.py",
120 "astroid/const.py",
121 "astroid/context.py",
122 "astroid/interpreter/_import/",
123 "astroid/modutils.py",
124 "astroid/nodes/const.py",
125 "astroid/nodes/utils.py",
126 ]
127 always_false = [
128 "PY311_PLUS",
129 "PY312_PLUS",
130 "PY313_PLUS",
131 ]
132 disallow_any_decorated = true
133 disallow_any_explicit = true
134 follow_imports = "silent"
135 scripts_are_modules = true
136 show_error_codes = true
137 strict = true
138 warn_redundant_casts = true
139 warn_unreachable = true
140 warn_unused_configs = false
141
142 [[tool.mypy.overrides]]
143 # Importlib typeshed stubs do not include the private functions we use
144 module = [
145 "_io.*",
146 "gi.*",
147 "importlib.*",
148 "numpy.*",
149 "pytest",
150 "setuptools",
151 ]
152 ignore_missing_imports = true
153
154 [tool.aliases]
155 test = "pytest"