[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py313"
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".ipynb_checkpoints",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pyenv",
    ".pytest_cache",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    ".vscode",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "site-packages",
    "venv",
]

[tool.ruff.lint]
select = [
    "E",   # pycodestyle
    "D",   # pydocestyle
    "F",   # Pyflakes
    "I",   # Isort
    "PL",  # Pylint,
    "T20", # flake-print
    "G",   # flake8-logging-format
    "RUF", # ruff
    "A",   # flake8-builtins
    "B",   # flake8-bugbear
    "G",   # flake8-logging-format
    "S",   # flake8-bandit
]
ignore = [
    "D203",
    "D213",
    "PLW0603",
    "G004",
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.isort]
lines-after-imports = 2

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"local.py" = ["T201"]

[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.mypy]
files = ["src", "tests"]

[[tool.mypy.overrides]]
module = "owsrequest"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "lambdacommon.*"
ignore_missing_imports = true

[tool.coverage.paths]
source = ["src/"]

[tool.coverage.report]
exclude_also = [
    "if TYPE_CHECKING:",
    "@abstractmethod"
]

[tool.pytest.ini_options]
xfail_strict = true

[tool.pytest_env]
Environment = {value = "testing", skip_if_set = true}
GRAPHQL_URL = "http://fake-api.com/graphql"
STORE_STATE_TABLE_NAME = "testing"
AWS_ACCESS_KEY_ID = "testing"
AWS_SECRET_ACCESS_KEY = "testing"
AWS_SECURITY_TOKEN = "testing"
AWS_SESSION_TOKEN = "testing"
AWS_DEFAULT_REGION = "us-east-1"
