materials icon indicating copy to clipboard operation
materials copied to clipboard

Check for final newline in code files

Open martin-martin opened this issue 10 months ago • 0 comments

When selecting specific Ruff rules, I think we need to add W292 so that it checks for final newlines in code files.

(Might be that black is doing that in this dual setup, but maybe we can move towards using only ruff?)

We could also switch to Ruff entirely from my understanding:

target-version = "py313"
exclude = [
    ".git",
    "venv",
    ".venv",
    "migrations",
    "node_modules",
]

lint.select = [
    "E",
    "F",
    "I",
    "RUF100",
    "W292"
]

line-length = 79

martin-martin avatar Mar 03 '25 10:03 martin-martin