Skip to content
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

Automatic formatting in CI #55

Open
danielhollas opened this issue Jan 23, 2025 · 0 comments
Open

Automatic formatting in CI #55

danielhollas opened this issue Jan 23, 2025 · 0 comments

Comments

@danielhollas
Copy link
Collaborator

PR #24 proposed to use a ruff formatter for the code and enforce it in the CI.
Docs for ruff formatter
setup in PyCharm
From the PR description:

One advantage of ruff is that it is also a linter (although I am not setting up the linter here, am planning to discuss separately in a follow-up PR), so we would have a single tool for both.

Ruff uses a formatting style of another very common formatter called "black", and is quite different from what we have now. @JanosJiri if you have a strong preference for the current format, that is totally fine, but in that case you need to figure out which formater PyCharm uses in your setup so I can use it as well and we can enforce it in CI.

Besides the choice of the formatter, there are other things to be decided:

  • line length: Right now I have configured maximum line length to 130 to preserve existing format. I would personally preferred a bit shorter lines, but it is entirely up to you. @JanosJiri perhaps you can experiment locally with configuring shorter lines and see what looks best to you.
  • Do we use single or double quotes? The current code was inconsistent so I used ruff's default of double quotes, but I have no strong opinions on this, both are fine and it is configurable.

See Discussion in #24, it's unclear if we want this, given that the current formatting is very different from black / ruff.

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

No branches or pull requests

1 participant