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,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:
|
||||
|
||||
Reference in New Issue
Block a user