[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "roll" description = "for initiative!" readme = "README.md" requires-python = ">=3.11" keywords = [] # license-files = { paths = ["LICENSE.txt"] } authors = [ { name = "mat ess", email = "mat@mat.services" }, ] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ "click", ] dynamic = ["version"] [project.urls] Documentation = "https://git.mat.services/mat/roll#readme" Issues = "https://git.mat.services/mat/roll/issues" Source = "https://git.mat.services/mat/roll" [project.scripts] roll = "roll.cli:cli" [tool.hatch.version] path = "roll/__about__.py" [tool.hatch.envs.default] dependencies = [ "coverage[toml]>=6.5", "hypothesis", "pytest", ] [tool.hatch.envs.default.scripts] test = "pytest {args:tests}" test-cov = "coverage run -m pytest {args:tests}" cov-report = [ "- coverage combine", "coverage report", ] check = [ "test-cov", "cov-report", ] [[tool.hatch.envs.all.matrix]] python = ["3.11"] [tool.hatch.envs.typing] extra-dependencies = ["mypy"] [tool.hatch.envs.typing.scripts] check = "mypy --install-types --non-interactive {args:roll tests}" [tool.hatch.envs.lint] detached = true dependencies = [ "black>=23.1.0", "ruff>=0.0.243", ] [tool.hatch.envs.lint.scripts] style = [ "ruff {args:.}", "black --check --diff {args:.}", ] fmt = [ "black {args:.}", "ruff --fix {args:.}", "style", ] check = [ "style", ] [tool.black] target-version = ["py311"] line-length = 100 # skip-string-normalization = true [tool.ruff] target-version = "py311" line-length = 100 select = [ "A", "ARG", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N", "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "T", "TID", "UP", "W", "YTT", ] ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", # Allow boolean positional values in function calls, like `dict.get(... True)` "FBT003", # Ignore checks for possible passwords "S105", "S106", "S107", # Ignore insecure random checks "S311", # Ignore complexity "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", ] unfixable = [ # Don't touch unused imports "F401", ] [tool.ruff.isort] known-first-party = ["roll"] [tool.ruff.flake8-tidy-imports] ban-relative-imports = "all" [tool.ruff.per-file-ignores] # Tests can use magic values, assertions, and relative imports "tests/**/*" = ["PLR2004", "S101", "TID252"] [tool.coverage.run] source_pkgs = ["roll", "tests"] branch = true parallel = true omit = [ "roll/__about__.py", ] [tool.coverage.paths] roll = ["roll", "*/roll/roll"] tests = ["tests", "*/roll/tests"] [tool.coverage.report] show_missing = true skip_empty = true fail_under = 100 exclude_lines = [ "no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:", ] [tool.mypy] pretty = true strict = true [[tool.mypy.overrides]] module = "tests.*" allow_untyped_defs = true allow_incomplete_defs = true check_untyped_defs = true