danielgtaylor / danielgtaylor/python-betterproto
Use Ruff on generated code (can replace isort)
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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`.
Guía de contribución
Línea de trabajo
Start by locating the generated-code formatting configuration and any existing isort setup, then review the Ruff documentation linked in the issue. Run `ruff check --fix` against the generated code and verify that Ruff provides the intended checks while replacing the current isort use; the issue's configuration example shows the expected direction.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100