File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # Python 2.7 and 3.3+ compatibility requirements (using py37 as minimum ruff supports)
2+ target-version = " py37"
3+
4+ # Define Python 2.7 builtins that don't exist in Python 3
5+ builtins = [" unicode" ]
6+
7+ line-length = 200
8+
9+ [lint ]
10+ # Enable most rules
11+ select = [
12+ " E" , # pycodestyle errors
13+ " W" , # pycodestyle warnings
14+ " F" , # Pyflakes
15+ " I" , # isort
16+ ]
17+
18+ ignore = [
19+ " I001" , # Import block unsorted
20+ " W292" , # No newline at end of file
21+ " W293" , # Blank line contains whitespace
22+ ]
23+
24+ # Per-file ignores for specific compatibility needs
25+ [lint .per-file-ignores ]
26+ # AST compatibility module needs star imports for Python version compatibility
27+ "src/python_minifier/ast_compat.py" = [" F403" , " F405" ]
28+
29+ # __init__.py files intentionally re-export for public API
30+ "*/__init__.py" = [" F401" ]
31+
32+ # Type comparisons needed for Python 2.7 compatibility in specific files
33+ "src/python_minifier/ast_compare.py" = [" E721" ]
34+ "src/python_minifier/rename/rename_literals.py" = [" E721" ]
35+ "src/python_minifier/transforms/constant_folding.py" = [" E721" ]
36+
37+ # Compatibility imports in utility modules
38+ "src/python_minifier/rename/util.py" = [" F401" ]
39+
40+ [lint .isort ]
41+ force-single-line = false
42+ known-first-party = [" python_minifier" ]
You can’t perform that action at this time.
0 commit comments