[project]
name = "pyawful"
version = "0.3.0"
description = "Pay ten dollars to get access to a dead forum."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "cssselect>=1.2.0",
    "lxml>=5.3.0",
    "requests>=2.32.3",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
    "pytest-mock>=3.14.0",
    "pytest>=8.3.3",
    "types-lxml>=2024.11.8",
    "types-requests>=2.32.0.20241016",
    "pyright>=1.1.390",
    "ruff>=0.8.2",
]

[tool.ruff.lint]
preview = true
select = [
    "E4",       # Import rules
    "E7",       # Statement rules
    "E9",       # Runtime rules
    "F",        # All Pyflakes rules
    "B006",     # mutable-argument-default: Do not use mutable data structures for argument defaults
    "B008",     # function-call-in-default-argument: Do not perform function call {name} in argument defaults;
    "PIE790",   # unnecessary-placeholder: Unnecessary pass statement
    "S303",     # suspicious-insecure-hash-usage: Use of insecure MD2, MD4, MD5, or SHA1 hash function
    "S324",     # hashlib-insecure-hash-function: Probable use of insecure hash functions in {library}: {string}
    "I",        # All isort rules
    "D",        # All pydocstyle rules
    "T201",     # Disallow `print` statements
]
ignore = [
    "D1",       # Don't enforce existence of docstrings
]
extend-unsafe-fixes = ["F401"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.isort]
known-first-party = ["tests"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
