fix: resolve CI lint and build failures
- Fixed lint path in CI workflow from src/gdiffer/ to gitignore_generator/ - Fixed verification command from gdiffer --version to gitignore --version - Removed unused imports (pathlib.Path, typing.List, os, sys, pytest, unittest.mock.patch) - Removed unused variable assignments (category, index) - Fixed f-strings without placeholders - Renamed ambiguous variable 'l' to 'line' and 'prev_line' - Added type assertion for type narrowing in template_loader.py
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
"""Tests for template loader."""
|
"""Tests for template loader."""
|
||||||
|
|
||||||
import os
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -107,6 +106,6 @@ class TestTemplateLoader:
|
|||||||
def test_duplicate_removal_in_merge(self, loader_with_templates):
|
def test_duplicate_removal_in_merge(self, loader_with_templates):
|
||||||
"""Test that duplicates are removed when merging."""
|
"""Test that duplicates are removed when merging."""
|
||||||
merged = loader_with_templates.merge_templates(["python", "python"])
|
merged = loader_with_templates.merge_templates(["python", "python"])
|
||||||
lines = [l for l in merged.splitlines() if l.strip() and not l.strip().startswith("#")]
|
lines = [line for line in merged.splitlines() if line.strip() and not line.strip().startswith("#")]
|
||||||
unique_lines = set(lines)
|
unique_lines = set(lines)
|
||||||
assert len(lines) == len(unique_lines)
|
assert len(lines) == len(unique_lines)
|
||||||
|
|||||||
Reference in New Issue
Block a user