-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathruff.toml
More file actions
55 lines (45 loc) · 1.29 KB
/
ruff.toml
File metadata and controls
55 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ruff.toml
line-length = 88
exclude = [
"simopt/gui/*",
"notebooks/*",
"simopt/models/ermexample.py",
"workshop/erm_data_generator.ipynb",
"workshop/workshop.ipynb"
]
[lint]
select = [
# Base style and correctness
"E", # pycodestyle formatting rules
"F", # pyflakes (undefined names, unused imports, etc.)
"B", # flake8-bugbear
"N", # pep8-naming
"UP", # pyupgrade (modern Python syntax)
"A", # flake8-builtins
"I", # isort
# Type hints and async code
"ANN", # flake8-annotations (required type hints)
"ASYNC", # flake8-async
# SimOpt-specific tech
"NPY201", # NumPy 2.0 compatibility
# Code Quality
"SIM", # flake8-simplify
"RET", # flake8-return
"PTH", # flake8-use-pathlib
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
# "C90", # mccabe complexity
# Ruff-specific
"RUF", # Ruff-exclusive rules
# Docs and structure
"D", # pydocstyle (docstring conventions)
]
[lint.mccabe]
max-complexity = 8
[lint.pydocstyle]
convention = "google"
ignore-decorators = ["simopt.utils.override"]
[lint.isort]
known-first-party = ["simopt", "mrg32k3a"]
[lint.pep8-naming]
classmethod-decorators = ["simopt.utils.classproperty"]