Skip to content

Instantly share code, notes, and snippets.

@olidroide
Created August 16, 2024 14:59
Show Gist options
  • Save olidroide/bc501ee68dd8050367eed4333d6ee6c9 to your computer and use it in GitHub Desktop.
Save olidroide/bc501ee68dd8050367eed4333d6ee6c9 to your computer and use it in GitHub Desktop.
ejemplo ruff configurado con pyroject.toml
[tool.ruff]
target-version="py312"
line-length = 120
show-fixes = true
# Exclude a variety of commonly ignored directories.
exclude = [
".direnv",
".eggs",
".git",
".mypy_cache",
".ruff_cache",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
".venv",
"__pycache__",
".pytest_cache",
".vscode",
]
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = []
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# flake8-use-pathlib
"PTH",
# eradicate
"ERA",
# flynt
"FLY",
# Perflint
"PERF",
# isort
"I",
# Ruff-specific rules
"RUF",
]
ignore = []
[tool.ruff.format]
quote-style = "single"
docstring-code-format = true
docstring-code-line-length = "dynamic"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
enabled = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment