blob: 8de0d1f4d94eb4dd00d87f9ec4f9097f873b56bb [file] [log] [blame]
[build-system]
requires = ["setuptools>=66.1"]
build-backend = "setuptools.build_meta"
[project]
name = "pylint"
license = {text = "GPL-2.0-or-later"}
description = "python code static checker"
readme = "README.rst"
authors = [
{name = "Python Code Quality Authority", email = "code-quality@python.org"}
]
keywords = ["static code analysis", "linter", "python", "lint"]
classifiers = [
"Development Status :: 6 - Mature",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Typing :: Typed"
]
requires-python = ">=3.8.0"
dependencies = [
"dill>=0.2;python_version<'3.11'",
"dill>=0.3.6;python_version>='3.11'",
"dill>=0.3.7;python_version>='3.12'",
"platformdirs>=2.2.0",
# Also upgrade requirements_test_min.txt.
# Pinned to dev of second minor update to allow editable installs and fix primer issues,
# see https://github.com/pylint-dev/astroid/issues/1341
"astroid>=3.1.0,<=3.2.0-dev0",
"isort>=4.2.5,<6,!=5.13.0",
"mccabe>=0.6,<0.8",
"tomli>=1.1.0;python_version<'3.11'",
"tomlkit>=0.10.1",
"colorama>=0.4.5;sys_platform=='win32'",
"typing-extensions>=3.10.0;python_version<'3.10'",
]
dynamic = ["version"]
[project.optional-dependencies]
testutils = ["gitpython>3"]
spelling = ["pyenchant~=3.2"]
[project.urls]
"Docs: User Guide" = "https://pylint.readthedocs.io/en/latest/"
"Source Code" = "https://github.com/pylint-dev/pylint"
"homepage" = "https://github.com/pylint-dev/pylint"
"What's New" = "https://pylint.readthedocs.io/en/latest/whatsnew/3/"
"Bug Tracker" = "https://github.com/pylint-dev/pylint/issues"
"Discord Server" = "https://discord.com/invite/Egy6P8AMB5"
"Docs: Contributor Guide" = "https://pylint.readthedocs.io/en/latest/development_guide/contributor_guide/index.html"
[project.scripts]
pylint = "pylint:run_pylint"
pylint-config = "pylint:_run_pylint_config"
pyreverse = "pylint:run_pyreverse"
symilar = "pylint:run_symilar"
[tool.setuptools]
license-files = ["LICENSE", "CONTRIBUTORS.txt"] # Keep in sync with setup.cfg
[tool.setuptools.packages.find]
include = ["pylint*"]
[tool.setuptools.package-dir]
# Simulate editable_mode=compat, described at:
# https://github.com/pypa/setuptools/issues/3767
# TODO: remove after solving root cause described at:
# https://github.com/pylint-dev/astroid/pull/2267#issuecomment-1666642781
"" = "."
[tool.setuptools.package-data]
pylint = ["testutils/testing_pylintrc", "py.typed"]
[tool.setuptools.dynamic]
version = {attr = "pylint.__pkginfo__.__version__"}
[tool.aliases]
test = "pytest"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["*test_*.py"]
addopts = "--strict-markers"
filterwarnings = "error"
markers = [
"primer_stdlib: Checks for crashes and errors when running pylint on stdlib",
"benchmark: Baseline of pylint performance, if this regress something serious happened",
"timeout: Marks from pytest-timeout.",
"needs_two_cores: Checks that need 2 or more cores to be meaningful",
]
[tool.isort]
profile = "black"
known_third_party = ["platformdirs", "astroid", "sphinx", "isort", "pytest", "mccabe", "six", "toml"]
skip_glob = ["tests/functional/**", "tests/input/**", "tests/extensions/data/**", "tests/regrtest_data/**", "tests/data/**", "astroid/**", "venv/**"]
src_paths = ["pylint"]
[tool.mypy]
scripts_are_modules = true
warn_unused_ignores = true
show_error_codes = true
enable_error_code = "ignore-without-code"
strict = true
# TODO: Remove this once pytest has annotations
disallow_untyped_decorators = false
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"_pytest.*",
"_string",
"astroid.*",
# `colorama` ignore is needed for Windows environment
"colorama",
"contributors_txt",
"coverage",
"dill",
"enchant.*",
"git.*",
"mccabe",
"pytest_benchmark.*",
"pytest",
"sphinx.*",
]
[tool.ruff]
# ruff is less lenient than pylint and does not make any exceptions
# (for docstrings, strings and comments in particular).
line-length = 115
[tool.ruff.lint]
select = [
"B", # bugbear
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PYI", # flake8-pyi
"UP", # pyupgrade
"RUF", # ruff
"W", # pycodestyle
]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"RUF012", # mutable default values in class attributes
]