@@ -75,6 +75,42 @@ webdriver-manager = "4.0.2"
7575diff-cover = " ^9.6.0"
7676black = " >=25.11,<27.0"
7777pre-commit = " ^4.5.0"
78+ ruff = " ^0.9.0"
79+
80+ [tool .ruff ]
81+ target-version = " py312"
82+ line-length = 88 # Match black
83+ extend-exclude = [
84+ " *.ipynb" , # Exclude Jupyter notebooks (different execution context)
85+ ]
86+
87+ [tool .ruff .lint ]
88+ select = [
89+ " F" , # pyflakes (undefined names, unused imports)
90+ " E" , # pycodestyle errors
91+ # "I", # isort (import sorting) - disabled due to circular import issues
92+ ]
93+ ignore = [
94+ " E501" , # line too long (handled by black/ruff-format)
95+ " E402" , # module level import not at top of file
96+ " E722" , # bare except (TODO: fix in future PR)
97+ " F403" , # star imports (TODO: refactor in future PR)
98+ " F405" , # may be undefined from star imports
99+ ]
100+
101+ [tool .ruff .lint .per-file-ignores ]
102+ "src/codeflare_sdk/vendored/**" = [" E" , " F" ] # Exclude vendored code
103+ "**/test_*.py" = [" F401" , " F811" , " F841" ] # Allow unused imports, redefinitions, and variables in tests
104+ "**/__init__.py" = [" F401" ] # Allow unused imports in __init__.py (re-exports for public API)
105+ "demo-notebooks/**/*.py" = [" F841" ] # Allow unused variables in demo notebooks
106+ "tests/**/*.py" = [" F841" ] # Allow unused variables in test scripts
107+ "scripts/**/*.py" = [" F841" ] # Allow unused variables in scripts
108+ "ui-tests/**/*.py" = [" F821" ] # Allow undefined names in UI test config
109+
110+ [tool .ruff .lint .isort ]
111+ known-first-party = [" codeflare_sdk" ]
112+ force-single-line = false
113+ lines-after-imports = 2
78114
79115[tool .pytest .ini_options ]
80116filterwarnings = [
0 commit comments