[tool.poetry]
name = "diff_cover"
version = "9.2.0"
description = "Run coverage and linting reports on diffs"
authors = ["See Contributors"]
homepage = "https://github.com/Bachmann1234/diff-cover"
repository = "https://github.com/Bachmann1234/diff-cover"
license = "Apache-2.0"
readme = "README.rst"
classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "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",
        "Topic :: Software Development :: Testing",
        "Topic :: Software Development :: Quality Assurance",
]
packages = [
    { include = "diff_cover" }
]
include = [
    {path = 'templates/*.txt'},
    {path = 'templates/*.html'},
    {path = 'templates/*.css'},
    {path = 'templates/*.md'},
    {path = 'tests/*', format = 'sdist'},
]

[tool.poetry.scripts]
diff-cover = 'diff_cover.diff_cover_tool:main'
diff-quality = 'diff_cover.diff_quality_tool:main'

[tool.poetry.dependencies]
python = "^3.8.10"
Pygments = "^2.9.0"
Jinja2 = ">=2.7.1"
pluggy = ">=0.13.1,<2"
chardet = ">=3.0.0"
tomli = {version = ">=1.2.1", optional = true}
setuptools = { version = ">=17.0.0", python = "<3.8" }

[tool.poetry.dev-dependencies]
pytest-cov = "^5.0.0"
pytest-datadir = "^1.5.0"
pytest-mock = "^3.14.0"
pycodestyle = ">=2.9.1"
flake8 = "^5.0.4"
pyflakes = "^2.5.0"
pylint = "^3.2.7"
pylint-pytest = "^1.1.8"
pydocstyle = "^6.1.1"
black = "^24.8.0"
isort = "^5.13.2"
doc8 = "1.1.1"

[tool.poetry.extras]
toml = ["tomli"]

[build-system]
requires = ["poetry-core>=1.0.7"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
exclude = "tests/fixtures/*"

[tool.isort]
profile = "black"
extend_skip = "tests/fixtures/"

[tool.pylint.master]
max-line-length = 100
load-plugins = [
    "pylint_pytest",
]

[tool.pylint."messages control"]
enable = ["all"]
disable = [
    # allow TODO comments
    "fixme",
    # allow disables
    "locally-disabled",
    "suppressed-message",
    # covered by isort
    "ungrouped-imports",
    # allow classes and functions w/o docstring
    "missing-docstring",
    # hard number checks can be ignored, because they are covered in code reviews
    "too-many-instance-attributes",
    "too-many-arguments",
    "too-many-locals",
    "too-many-branches",
    "too-few-public-methods",
    "too-many-nested-blocks",
    "too-many-public-methods",
    # allow methods not to use self
    "no-self-use",
    # currently some code seems duplicated for pylint
    "duplicate-code",
    # we are a command line tool and don't want to show all internals
    "raise-missing-from",
]

[tool.pylint.basic]
good-names = [
    "_",
    "i",
    "setUp",
    "tearDown",
    "e",
    "ex",
]
no-docstring-rgx = "^_"

[tool.pytest.ini_options]
addopts = "--strict-markers"
xfail_strict = true
markers = [
    "disable_all_files_exist: disables the fixture patch_so_all_files_exist",
]

[tool.doc8]
max_line_length = 120
