Skip to content

Check for final newline in code files #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin-martin
Copy link
Contributor

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

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?)
@martin-martin martin-martin requested a review from gahjelle March 3, 2025 10:18
@martin-martin martin-martin self-assigned this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant