danielgtaylor / danielgtaylor/python-betterproto

Use Ruff on generated code (can replace isort)

Aperta
#488 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

https://beta.ruff.rs

Config example:
```toml
# pyproject.toml

[tool.ruff]
# https://beta.ruff.rs/docs/rules
line-length = 88 # Default
select = ["ALL"]
ignore = [
# "D203",
# "D213",
"D",
"RUF009", # See `extend-immutable-calls`
"ERA001", # Detects comments as code
# "A003", # See `builtins-ignorelist`
"UP006", # https://github.com/danielgtaylor/python-betterproto/issues/485
]

[tool.ruff.flake8-builtins]
builtins-ignorelist = ["id", "type"]

[tool.ruff.flake8-bugbear]
# https://github.com/charliermarsh/ruff/issues/4355
extend-immutable-calls = ["betterproto.*"]
```

It's possible to have it only emulate isort, but I've tried to enable as much as possible from it, which is still incredibly fast.

Can be run as `ruff check --fix`.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.