[project]
name = "playscii"
version = "9.18"
description = "ascii art and game creation tool"
requires-python = ">=3.12"
dependencies = [
    "appdirs",
    "numpy",
    "Pillow",
    "PyOpenGL",
    "PySDL2",
    "packaging",
]

[dependency-groups]
dev = [
    "ruff",
    "pytest",
    "ty",
]

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

[tool.ruff]
src = ["playscii"]
line-length = 88

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = [
    "E402",   # module-import-not-at-top (intentional for SDL2 init)
    "E501",   # line-too-long (formatter handles what it can)
    "E741",   # ambiguous-variable-name (common in math/game code)
    "B006",   # mutable-argument-default (legacy code, risky to change)
    "SIM102", # collapsible-if (stylistic preference)
    "SIM108", # if-else-block-instead-of-if-exp (stylistic preference)
    "SIM110", # use-all-instead-of-for-loop (stylistic preference)
    "SIM113", # enumerate-for-loop (stylistic preference)
    "SIM115", # open-file-with-context-handler (too invasive for legacy code)
    "SIM116", # if-else-block-instead-of-dict-lookup (stylistic preference)
    "SIM201", # negate-equal-op (stylistic preference)
    "SIM222", # expr-or-true (debug code)
    "SIM223", # expr-and-false (debug code)
]

[tool.pytest.ini_options]
testpaths = ["tests"]
