[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "ferny"
description = "A Python API wrapped around ssh(1)"
authors = [{name = "Allison Karlitskaya", email = "allison.karlitskaya@redhat.com"}]
license = {file = "COPYING"}
readme = "README.md"
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
dynamic = ["version"]

[project.urls]
Home = "https://github.com/allisonkarlitskaya/ferny/"

[tool.setuptools_scm]
write_to = "src/ferny/_version.py"

[tool.setuptoools.package-data]
"ferny" = "py.typed"

[tool.mypy]
mypy_path = 'src'

[tool.pylint]
max-line-length = 118

[tool.pytest.ini_options]
timeout = 30
addopts = ["--strict-markers"]
pythonpath = ["src"]
log_cli = true

[tool.ruff]
select = [
    "ANN",
    "A",
    "B",
    "E",
    "F",
    "G",
    "I",
    "TID",
]
ignore = [
    "A003",      # Class attribute is shadowing a python builtin
    "ANN101",    # Missing type annotation for `self` in method (typing.Self is not in Python 3.6)
    "B905",      # `zip()` without an explicit `strict=` parameter (not available in Python 3.6)
]
src = ["src"]
line-length = 118

[tool.ruff.flake8-annotations]
allow-star-arg-any = true

[tool.ruff.flake8-tidy-imports.banned-api]
"typing.Dict".msg = "use 'dict[]' in quotes"
"typing.List".msg = "use 'list[]' in quotes"
"typing.Optional".msg = "use '| None' in quotes"
"typing.Set".msg = "use 'set[]' in quotes"
"typing.Type".msg = "use 'type[]' in quotes"
"typing.Union".msg = "use '|' in quotes"

[tool.coverage.paths]
source = ["src", "*/site-packages"]

[tool.coverage.run]
source_pkgs = ["ferny"]
branch = true

[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
  "pragma: no cover",  # default
  "raise NotImplementedError",
]
