fix: resolve CI lint and build failures
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled

- 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:
2026-02-02 16:06:16 +00:00
parent 431b21019d
commit 0bf378ce70

View File

@@ -1,7 +1,6 @@
"""Template loader for gitignore-generator."""
import json
import os
from pathlib import Path
from typing import Dict, List, Optional, Set
@@ -25,6 +24,7 @@ class TemplateLoader:
self._templates_index = json.load(f)
else:
self._templates_index = {"languages": [], "ides": [], "custom": []}
assert self._templates_index is not None
return self._templates_index
def _save_templates_index(self) -> None:
@@ -86,7 +86,6 @@ class TemplateLoader:
if category:
categories = [category]
else:
index = self._load_templates_index()
categories = ["languages", "ides"]
for cat in categories: