From 615d4cf38edeb3554bd6f3248d07a0e1a73c8f55 Mon Sep 17 00:00:00 2001 From: Austin Gregg-Smith Date: Thu, 14 Nov 2024 10:41:26 +0000 Subject: [PATCH] extract ruff settings into ruff.toml --- ruff.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ruff.toml diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..6aacb0e --- /dev/null +++ b/ruff.toml @@ -0,0 +1,16 @@ +line-length = 100 + +[lint] +# E501: Lines too long (maximum of 79 characters). +ignore = [ + "E501", # Long line that exceeds maximum allowed length. + "F841", # Local variable referenced before assignment, this is annoying during development. +] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`. +[lint.per-file-ignores] +"__init__.py" = ["E402", "F401"] +"**/{tests,docs,tools}/*" = ["E402"]