mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-15 04:28:18 -04:00
added ruff the treefmt
This commit is contained in:
66
pyproject.toml
Normal file
66
pyproject.toml
Normal file
@@ -0,0 +1,66 @@
|
||||
[project]
|
||||
name = "system_tools"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = [{ name = "Richie Cahill", email = "richie@tmmworkshop.com" }]
|
||||
requires-python = "~=3.13.0"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
# these dependencies are a best effort and aren't guaranteed to work
|
||||
dependencies = ["apprise", "apscheduler", "polars", "requests", "typer"]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"mypy",
|
||||
"pyfakefs",
|
||||
"pytest-cov",
|
||||
"pytest-mock",
|
||||
"pytest-xdist",
|
||||
"pytest",
|
||||
"ruff",
|
||||
"types-requests",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
|
||||
target-version = "py313"
|
||||
|
||||
line-length = 120
|
||||
|
||||
lint.select = ["ALL"]
|
||||
lint.ignore = [
|
||||
"G004", # (PERM) This is a performers nit
|
||||
"COM812", # (TEMP) conflicts when used with the formatter
|
||||
"ISC001", # (TEMP) conflicts when used with the formatter
|
||||
"S603", # (PERM) This is known to cause a false positive
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
|
||||
"tests/**" = [
|
||||
"S101", # (perm) pytest needs asserts
|
||||
]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
[tool.ruff.lint.flake8-builtins]
|
||||
builtins-ignorelist = ["id"]
|
||||
|
||||
[tool.ruff.lint.pylint]
|
||||
max-args = 9
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["system_tools"]
|
||||
|
||||
[tool.coverage.report]
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"if TYPE_CHECKING:",
|
||||
"raise NotImplementedError",
|
||||
"if __name__ == \"__main__\":",
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = "-n auto -ra"
|
||||
# --cov=system_tools --cov-report=term-missing --cov-report=xml --cov-report=html --cov-branch
|
||||
12
treefmt.toml
12
treefmt.toml
@@ -12,3 +12,15 @@ command = "nixfmt"
|
||||
#options = []
|
||||
# Glob pattern of files to include
|
||||
includes = ["*.nix"]
|
||||
|
||||
[formatter.ruff-format]
|
||||
command = "ruff"
|
||||
options = ["format"]
|
||||
includes = ["python/**/*.py"]
|
||||
priority = 0
|
||||
|
||||
[formatter.ruff]
|
||||
command = "ruff"
|
||||
options = ["check", "--fix"]
|
||||
includes = ["python/**/*.py"]
|
||||
priority = 1
|
||||
|
||||
Reference in New Issue
Block a user