[project]
name = "subscleaner"
version = "2.1.0"
description = "Remove advertisements from subtitle files"
authors = [
    {name = "Roger Gonzalez", email = "roger@rogs.me"}
]
license = {text = "GPL-3.0-or-later"}
readme = "README.md"
requires-python = ">=3.9"
keywords = ["subtitles", "subs"]
classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
    "Operating System :: OS Independent",
]
dependencies = [
    "pysrt>=1.1.2",
    "chardet>=5.2.0",
    "appdirs>=1.4.4",
]

[dependency-groups]
dev = [
    "pre-commit>=4.2.0",
    "pytest>=8.3.5",
    "pytest-cov>=6.0.0",
    "python-lsp-ruff>=2.2.2",
    "python-lsp-server>=1.12.2",
]

[project.urls]
Homepage = "https://gitlab.com/rogs/subscleaner/"
Repository = "https://gitlab.com/rogs/subscleaner/"
Documentation = "https://gitlab.com/rogs/subscleaner/-/blob/master/README.md"

[project.scripts]
subscleaner = "subscleaner.subscleaner:main"

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

[tool.hatch.build.targets.wheel]
packages = ["src/subscleaner"]

[tool.hatch.build.targets.sdist]
include = [
    "src/subscleaner",
    "README.md",
    "LICENSE",
]

[tool.ruff]
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",
    "__init__.py"
]

line-length = 121
indent-width = 4
target-version = "py39"

[tool.ruff.lint]
select = ["E", "F", "PL", "B", "A", "C4", "TID", "ERA", "RET", "W", "C90", "ARG", "Q", "FLY", "SIM", "COM", "D"]
ignore = ["E402", "PLW2901"]

[tool.ruff.lint.pylint]
max-args = 6

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

[tool.pytest.ini_options]
pythonpath = [
    "."
]