fix: resolve CI linting and type checking errors
This commit is contained in:
@@ -66,9 +66,7 @@ class StructureGenerator:
|
||||
if self.preview:
|
||||
self._print_preview_summary()
|
||||
|
||||
def _create_directories(
|
||||
self, base_path: Path, issue_data: IssueData
|
||||
) -> None:
|
||||
def _create_directories(self, base_path: Path, issue_data: IssueData) -> None:
|
||||
"""Create project directories.
|
||||
|
||||
Args:
|
||||
@@ -127,9 +125,7 @@ class StructureGenerator:
|
||||
except OSError as e:
|
||||
raise OSError(f"Failed to write file {file_path}: {e}")
|
||||
|
||||
def _create_readme(
|
||||
self, base_path: Path, issue_data: IssueData, project_name: str
|
||||
) -> None:
|
||||
def _create_readme(self, base_path: Path, issue_data: IssueData, project_name: str) -> None:
|
||||
"""Create README.md file.
|
||||
|
||||
Args:
|
||||
@@ -143,7 +139,7 @@ class StructureGenerator:
|
||||
|
||||
## Description
|
||||
|
||||
{issue_data.body[:500]}{'...' if len(issue_data.body) > 500 else ''}
|
||||
{issue_data.body[:500]}{"..." if len(issue_data.body) > 500 else ""}
|
||||
|
||||
**GitHub Issue:** #{issue_data.number}
|
||||
**Repository:** {issue_data.repository}
|
||||
@@ -151,13 +147,19 @@ class StructureGenerator:
|
||||
|
||||
## Requirements
|
||||
|
||||
{chr(10).join(f"- {req}" for req in issue_data.requirements)
|
||||
if issue_data.requirements else "- See GitHub issue for requirements"}
|
||||
{"
|
||||
".join(f"- {req}" for req in issue_data.requirements)
|
||||
if issue_data.requirements
|
||||
else "- See GitHub issue for requirements"
|
||||
}
|
||||
|
||||
## TODO Items
|
||||
|
||||
{chr(10).join(f"- [ ] {item}" for item in issue_data.get_todo_items())
|
||||
if issue_data.get_todo_items() else "- No TODO items found"}
|
||||
{"
|
||||
".join(f"- [ ] {item}" for item in issue_data.get_todo_items())
|
||||
if issue_data.get_todo_items()
|
||||
else "- No TODO items found"
|
||||
}
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -185,9 +187,7 @@ MIT
|
||||
FileSpec(path="README.md", content=readme_content),
|
||||
)
|
||||
|
||||
def _create_gitignore(
|
||||
self, base_path: Path, project_name: str, language: str
|
||||
) -> None:
|
||||
def _create_gitignore(self, base_path: Path, project_name: str, language: str) -> None:
|
||||
"""Create .gitignore file based on language.
|
||||
|
||||
Args:
|
||||
@@ -249,6 +249,7 @@ Cargo.lock
|
||||
Sanitized name.
|
||||
"""
|
||||
import re
|
||||
|
||||
name = re.sub(r"[^a-zA-Z0-9\s_-]", "", name)
|
||||
name = re.sub(r"\s+", "-", name.strip())
|
||||
return name.lower()[:50] or "project"
|
||||
|
||||
Reference in New Issue
Block a user