-
Notifications
You must be signed in to change notification settings - Fork 364
Expand file tree
/
Copy pathruff.toml
More file actions
50 lines (42 loc) · 1.4 KB
/
ruff.toml
File metadata and controls
50 lines (42 loc) · 1.4 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
# Ruff configuration
target-version = "py311"
line-length = 88
# Exclude same paths as pre-commit
exclude = [
"jac/jaclang/vendor/",
# Generated Lark standalone parsers
"jac/jaclang/pycore/lark_jac_parser.py",
"jac/jaclang/pycore/lark_ts_parser.py",
# Examples may contain Python 3.12+ syntax for demonstration
"jac/examples/",
]
[lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"N", # pep8-naming
"C4", # flake8-comprehensions
"I", # isort (import sorting)
"B", # flake8-bugbear
"ANN", # flake8-annotations
"SIM", # flake8-simplify
"UP", # pyupgrade
"T201", # print statements - use console abstraction instead
]
# TODO: Make strict: Ignore E501 (line too long) - let formatter handle code, accept long strings/comments
ignore = ["E501"]
# Enable auto-fix for all fixable rules
fixable = ["ALL"]
[lint.isort]
known-first-party = ["jaclang", "jac_client", "jac_scale", "byllm"]
[lint.flake8-annotations]
suppress-none-returning = true
[lint.per-file-ignores]
# Allow print in tests (for debugging output), scripts, and test fixtures
"**/tests/**/*.py" = ["T201"]
"**/fixtures/**/*.py" = ["T201"]
"scripts/**/*.py" = ["T201"]
"docs/scripts/**/*.py" = ["T201"]
# Bootstrap/low-level files that run before console is available
"jac/jaclang/compiler/__init__.py" = ["T201"]
"jac/jaclang/pycore/tsparser.py" = ["T201"]