Skip to content

Commit

Permalink
Create .ruff.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Jun 21, 2024
1 parent abfc608 commit e08d7c7
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# https://docs.astral.sh/ruff/settings/
# Exclude a variety of commonly ignored directories.
exclude = [
".eggs",
".git",
"__pycache__"
]

line-length = 88

select = ['E', 'F', 'W']
ignore = ["E203"]

# Assume Python 3.7
target-version = "py37"

[lint.per-file-ignores]

# tests often manipulate sys.path before importing the main tools, so ignore import order violations
"test/*.py" = ["E402"]

# multiple spaces after ',' and long lines - used for visual layout of eFuse data
"espefuse/efuse/*/mem_definition.py" = ["E241", "E501"]
"espefuse/efuse/*/operations.py" = ["E241", "E501", "F401"]
"espefuse/efuse/*/fields.py" = ["E241", "E501"]

# ignore long lines - used for RS encoding pairs
"test/test_modules.py" = ["E501"]

# don't check for unused imports in __init__.py files
"__init__.py" = ["F401"]

# allow definition from star imports in docs config
"docs/conf_common.py" = ["F405"]


[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

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


# ruff-format hook configuration
[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true

0 comments on commit e08d7c7

Please sign in to comment.