# Ruff configuration #################### exclude = [ ".git", ".netbox", ".ruff_cache", ".venv", "venv", ] line-length = 120 indent-width = 4 respect-gitignore = true target-version = "py312" [lint] preview = true extend-select = [ "E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent) "E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces) "E3", # pycodestyle errors: blank lines / spacing around definitions "E501", # pycodestyle: line too long (enforced with `line-length` above) "W", # pycodestyle warnings (various style warnings, often whitespace/newlines) "I", # import sorting (isort-equivalent) "RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return) "UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms) "RUF022", # ruff: enforce sorted `__all__` lists ] ignore = [ "E266", # pycodestyle: too many leading '#' for block comment "S110" # ruff try-except-pass ] [lint.per-file-ignores] "configuration/*" = [ "E501", # pycodestyle: line too long (enforced with `line-length` above) "E722" # pycodestyle: do not use bare `except` ] "docker/*" = [ "E501", # pycodestyle: line too long (enforced with `line-length` above) "E722" # pycodestyle: do not use bare `except` ] [format] quote-style = "single" indent-style = "space" line-ending = "lf"