chore: apply ruff and formatting changes for better code quality

This commit is contained in:
sankalp committed 2025-10-29 12:17:46 +05:45
1 parent 6bd0caf1f1
commit 5b2ed44a64
3 files changed
+6 -7

No files matched your search

-1
View File
@@ -22,7 +22,6 @@ ignore = [
"__init__.py" = ["F401"] # imported but unused
[format]
docstring-code-format = true
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
+5 -5
View File
@@ -54,7 +54,7 @@ class AppManager:
def _create_django_app(self) -> bool:
# Detect project structure
is_nested, nested_dir, apps_base_dir = self._detect_project_structure()
# manage.py is always in the project root (current_dir), not in the project directory
manage_py_path = os.path.join(self.current_dir, "manage.py")
if not os.path.exists(manage_py_path):
@@ -66,9 +66,9 @@ class AppManager:
UIFormatter.print_info(f"Creating app '{self.app_name}' in directory: {os.getcwd()}")
result = subprocess.run(
["django-admin", "startapp", self.app_name],
capture_output=True,
text=True,
["django-admin", "startapp", self.app_name],
capture_output=True,
text=True,
check=True
)
@@ -93,7 +93,7 @@ class AppManager:
# Detect project structure to determine the correct app module path
is_nested, nested_dir, apps_base_dir = self._detect_project_structure()
# Determine the correct module path for the app
if is_nested and nested_dir:
app_module_path = f"{nested_dir}.{self.app_name}"
+1 -1
View File
@@ -298,7 +298,7 @@ def get_user_input() -> Tuple[str, str, str, list, dict]:
project_dir = collector.get_validated_input(
"Enter project directory name", validate_project_name, "project directory name"
)
# Check if directory exists and ask for alternative
while os.path.exists(project_dir):
UIFormatter.print_error(f"Directory '{project_dir}' already exists.")