Skip to content

Commit

Permalink
ADDED: pyproject.toml
Browse files Browse the repository at this point in the history
* Used only for ruff linter configuration (for now)
  • Loading branch information
jenisys committed Jun 8, 2023
1 parent 9510817 commit 32acf24
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -----------------------------------------------------------------------------
# SECTION: ruff -- Python linter
# -----------------------------------------------------------------------------
# SEE: https://github.com/charliermarsh/ruff
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
[tool.ruff]
select = ["E", "F"]
ignore = []

# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W",
"ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC",
"NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF",
"TCH", "TID", "TRY", "UP", "YTT"
]
unfixable = []

# Exclude a variety of commonly ignored directories.
exclude = [
".direnv",
".eggs",
".git",
".ruff_cache",
".tox",
".venv*",
"__pypackages__",
"build",
"dist",
"venv",
]
per-file-ignores = {}

# Same as Black.
# WAS: line-length = 88
line-length = 100

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"

[tool.ruff.mccabe]
max-complexity = 10

0 comments on commit 32acf24

Please sign in to comment.