[build-system]
requires = [
    "setuptools >= 42",
    "wheel >= 0.29.0",
    "setuptools_scm[toml] >= 3.4"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "dirty-tag"

[tool.isort]
skip_gitignore = true
profile = "black"

[tool.flake8]
max-line-length = 99
ignore = ["E203", "W503"]

[tool.mypy]
python_version = "3.9"
strict = true
ignore_missing_imports = true
disallow_any_generics = false
warn_return_any = false
disallow_untyped_decorators = false
disallow_subclassing_any = false
show_error_codes = true

[tool.pytest.ini_options]
addopts = "-rsx --tb=short --strict-config --strict-markers -p anyio -p no:asyncio"
testpaths = ["tests"]
# Ignore resource warnings due to a CPython/Windows bug (https://bugs.python.org/issue44428)
filterwarnings = [
    "error",
    "ignore:unclosed <socket.socket.*:ResourceWarning",
    "ignore:unclosed transport <_ProactorSocketTransport.*:ResourceWarning",
    # Workaround for Python 3.9.7 (see https://bugs.python.org/issue45097)
    "ignore:The loop argument is deprecated since Python 3\\.8, and scheduled for removal in Python 3\\.10\\.:DeprecationWarning:asyncio",
    "ignore:Python 3.6 is no longer supported*"
]
markers = [
    "network: marks tests as requiring Internet access",
]

[tool.coverage.run]
source = ["anyio"]
relative_files = true

[tool.coverage.report]
show_missing = true
