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