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

Code formatting: Python #2509

Closed
danlapid opened this issue Aug 9, 2024 · 2 comments · Fixed by #2573
Closed

Code formatting: Python #2509

danlapid opened this issue Aug 9, 2024 · 2 comments · Fixed by #2573

Comments

@danlapid
Copy link
Contributor

danlapid commented Aug 9, 2024

Format Python code
Definition of Done:

  1. documentation
  2. optional commit hooks
  3. proper blame handling
  4. CI checks
@npaun
Copy link
Member

npaun commented Aug 20, 2024

We're probably going to go with ruff: https://github.com/astral-sh/ruff

@hoodmane
Copy link
Contributor

hoodmane commented Aug 21, 2024

I have for my ruff config

lint.select = [
  "B0",     # bugbear (all B0* checks enabled by default)
  "B904",   # bugbear (Within an except clause, raise exceptions with raise ... from err)
  "B905",   # bugbear (zip() without an explicit strict= parameter set.)
  "C9",     # mccabe complexity
  "E",      # pycodestyles
  "W",      # pycodestyles
  "F",      # pyflakes
  "I",      # isort
  "PGH",    # pygrep-hooks
  "PLC",    # pylint conventions
  "PLE",    # pylint errors
  "UP",     # pyupgrade
]
lint.ignore = [
  "E402",  # module import not at top of file
  "E731",  # do not assign a lambda use a def
  "E741", # Ambiguous variable name
  "UP031", # Use format specifiers instead of percent format
  "UP038" # Use X | Y in isinstance check instead of (X, Y)
]

@npaun npaun linked a pull request Aug 21, 2024 that will close this issue
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 a pull request may close this issue.

3 participants