forked from openai/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
82 lines (74 loc) · 1.97 KB
/
Copy pathruff.toml
File metadata and controls
82 lines (74 loc) · 1.97 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Ruff Linter Configuration
# Phenotype Standard - Python linter rules
# https://docs.astral.sh/ruff/settings/
# Target Python 3.10 minimum
target-version = "py310"
# Line length (should match .editorconfig)
line-length = 100
# Vendored upstream trees (see AGENTS.md / ARCHITECTURE.md) are retained as
# read-only reference material and are not linted or formatted by CI.
# Top-level extend-exclude (not [lint] per-file-ignores) so that both
# `ruff check` and `ruff format` skip them.
extend-exclude = [
"codex-rs",
"codex-cli",
# Ruff 0.16+ also formats Python code fences inside Markdown, which
# churns research/consolidated docs on every formatter upgrade. Scope
# the formatter to Python source files only.
"*.md",
]
# Enable rule sections
[lint]
# pyflakes + pycodestyle
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
]
# Additional rules
extend-select = [
"I", # isort (import sorting)
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
]
# Ignore specific rules
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"SIM102", # Use a single if statement instead of nested if
]
# Fixable rules (auto-fix on format)
fixable = ["ALL"]
unfixable = []
# Exclude patterns
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".pytest_cache",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Per-file ignores
[lint.per-file-ignores]
"__init__.py" = ["F401", "I001"] # Allow unused imports in __init__
"tests/**/*.py" = ["S101", "B011"] # Allow assert in tests, allow deliberate bugs