Skip to content

Commit 32a8dc0

Browse files
Add Ruff configuration file
1 parent f98886a commit 32a8dc0

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

ruff.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Ruff configuration
2+
# https://docs.astral.sh/ruff/configuration/
3+
4+
line-length = 120
5+
target-version = "py38"
6+
7+
exclude = [
8+
".git",
9+
".venv",
10+
"__pycache__",
11+
"build",
12+
"dist",
13+
"*.egg-info",
14+
"*virtualenv*",
15+
"optimizely/lib/pymmh3.py",
16+
"tests/testapp/application.py",
17+
]
18+
19+
[lint]
20+
# Flake8-equivalent rules:
21+
# E, W = pycodestyle (style errors & warnings)
22+
# F = Pyflakes (logic errors, undefined names, unused imports)
23+
select = ["E", "W", "F"]
24+
25+
# Match current flake8 ignores
26+
# E722 - do not use bare 'except'
27+
ignore = ["E722"]
28+
29+
# Allow autofix for all rules
30+
fixable = ["ALL"]
31+
unfixable = []
32+
33+
[lint.per-file-ignores]
34+
# Ignore unused imports in __init__ files
35+
"__init__.py" = ["F401"]
36+
37+
[lint.isort]
38+
known-first-party = ["optimizely"]

0 commit comments

Comments
 (0)