Skip to content

Commit 8c29d54

Browse files
committed
fix: review -- clean up misleading flake8 comments, remove no-op list comprehension
1. .flake8: removed dead extend-ignore (select already filters). Clarified that style codes are intentionally excluded, only bugs checked. 2. dna_extractor.py: removed discarded list comprehension on line 826 that checked for test directories but never used the result. Skipped: removing security job path gate (trufflehog already scans diff only, Trivy on docs-only PRs wastes CI minutes for zero value). 289 tests pass. Zero flake8 errors.
1 parent 63d71f4 commit 8c29d54

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

backend/.flake8

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
[flake8]
22
max-line-length = 120
33

4-
# What we check (F = pyflakes errors, E9 = runtime errors, W6 = deprecated)
4+
# Only check for real bugs, not style.
5+
# F = pyflakes (unused imports, undefined names, shadowed vars)
6+
# E9 = runtime errors (syntax errors, indentation)
7+
# W6 = deprecated features
8+
# Style codes (E1/E2/E3/E5/W1/W2/W3/W5) are intentionally excluded.
59
select = E9,F,W6
610

7-
# What we ignore
8-
# E501: line too long (handled by max-line-length for selected codes)
9-
# W503/W504: line break before/after binary operator (PEP8 contradicts itself)
10-
# E128/E127: continuation line indentation (style preference)
11-
# E226: missing whitespace around operator (style preference)
12-
# E261: spacing before inline comment (style preference)
13-
# E301/E302/E303: blank line issues (style preference)
14-
# E402: module level import not at top (needed for dotenv loading in main.py)
15-
extend-ignore = E501,W503,W504
16-
1711
# Directories to skip
1812
exclude =
1913
.git,

backend/services/dna_extractor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,6 @@ def _extract_test_patterns(self, files: List[Path], repo_path: Path) -> TestPatt
822822
conftest_files = list(repo_path.rglob('conftest.py'))
823823
pattern.has_conftest = len(conftest_files) > 0
824824

825-
# Check for test directory structure
826-
[d for d in ['tests', 'test'] if (repo_path / d).exists()]
827-
828825
for file_path in files:
829826
try:
830827
content = file_path.read_text(encoding='utf-8', errors='ignore')

0 commit comments

Comments
 (0)