[build-system]
build-backend = "setuptools.build_meta"
requires = [
  "setuptools>=64",
  "setuptools_scm>=7,<8; python_version<'3.8'",
  "setuptools_scm>=8; python_version>='3.8'",
]

[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"

[tool.black]
exclude = '''
/(
      \.eggs
    | \.git
    | \.mypy_cache
    | \.tox
    | \.venv
    | \.pytype
    | _build
    | buck-out
    | build
    | dist
)/
| docs/conf.py
'''
line-length = 100
target-version = ['py37', 'py38', 'py39', 'py310', 'py311', 'py312']

[tool.coverage.run]
branch = true
source = ['tcolorpy']

[tool.coverage.report]
exclude_lines = [
  'except ImportError',
  'raise NotImplementedError',
  'pass',
  'ABCmeta',
  'abstractmethod',
  'abstractclassmethod',
  'warnings.warn',
]
precision = 1
show_missing = true

[tool.isort]
include_trailing_comma = true
known_third_party = [
  'pytest',
]
line_length = 100
lines_after_imports = 2
multi_line_output = 3
skip_glob = [
  '*/.eggs/*',
  '*/.pytype/*',
  '*/.tox/*',
]

[tool.mypy]
ignore_missing_imports = true
python_version = 3.7

pretty = true

check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
show_error_codes = true
show_error_context = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.pyright]
exclude = [
    "**/node_modules",
    "**/__pycache__",
    ".tox",
    ".venv",
    "_build",
    "_sandbox",
    "build",
    "dist"
]
pythonVersion = "3.7"

[tool.pytest.ini_options]
testpaths = [
  "test",
]

md_report = true
md_report_color = "auto"
md_report_verbose = 0

[tool.ruff]
line-length = 100
target-version = "py37"
exclude = [
    ".eggs/",
    ".tox/",
    "_sandbox/*",
    "build/",
    "docs/conf.py",
]
