|
21 | 21 |
|
22 | 22 | from django_tailwind_cli.config import get_config |
23 | 23 |
|
24 | | -app = Typer( |
| 24 | +app = Typer( # pyright: ignore[reportUnknownVariableType] |
25 | 25 | name="tailwind", |
26 | 26 | help="""Tailwind CSS integration for Django projects. |
27 | 27 |
|
@@ -430,10 +430,11 @@ def _list_template_files_enhanced(td: str | Path, source: str) -> int: |
430 | 430 | _list_template_files_enhanced(app_template_dir, "app") |
431 | 431 |
|
432 | 432 | # Scan global template directories |
433 | | - global_template_dirs = settings.TEMPLATES[0]["DIRS"] if settings.TEMPLATES else [] |
| 433 | + global_template_dirs: list[str] = settings.TEMPLATES[0]["DIRS"] if settings.TEMPLATES else [] |
434 | 434 | if verbose: |
435 | 435 | typer.secho(f"🌐 Found {len(global_template_dirs)} global template directories", fg=typer.colors.BLUE) |
436 | 436 |
|
| 437 | + template_dir: str |
437 | 438 | for template_dir in global_template_dirs: |
438 | 439 | _list_template_files_enhanced(template_dir, "global") |
439 | 440 |
|
@@ -579,9 +580,9 @@ def show_config(): |
579 | 580 | typer.secho(f" TAILWIND_CLI_DIST_CSS: {dist_css_setting}", fg=typer.colors.GREEN) |
580 | 581 |
|
581 | 582 | # Platform information |
582 | | - from django_tailwind_cli.config import _get_platform_info |
| 583 | + from django_tailwind_cli.config import get_platform_info |
583 | 584 |
|
584 | | - platform_info = _get_platform_info() |
| 585 | + platform_info = get_platform_info() |
585 | 586 | typer.secho("\n💻 Platform Information:", fg=typer.colors.YELLOW, bold=True) |
586 | 587 | typer.secho(f" Operating System: {platform_info.system}", fg=typer.colors.GREEN) |
587 | 588 | typer.secho(f" Architecture: {platform_info.machine}", fg=typer.colors.GREEN) |
@@ -1318,12 +1319,6 @@ def _download_cli_with_progress(url: str, filepath: Path) -> None: |
1318 | 1319 | raise CommandError(f"Failed to download Tailwind CSS CLI: {e}") from e |
1319 | 1320 |
|
1320 | 1321 |
|
1321 | | -def _setup_tailwind_environment() -> None: |
1322 | | - """Common setup for all Tailwind commands.""" |
1323 | | - _download_cli() |
1324 | | - _create_standard_config() |
1325 | | - |
1326 | | - |
1327 | 1322 | def _setup_tailwind_environment_with_verbose(*, verbose: bool = False) -> None: |
1328 | 1323 | """Common setup for all Tailwind commands with verbose logging.""" |
1329 | 1324 | if verbose: |
@@ -1563,11 +1558,6 @@ def _download_cli_with_verbose(*, verbose: bool = False, force_download: bool = |
1563 | 1558 | DAISY_UI_SOURCE_CSS = '@import "tailwindcss";\n@plugin "daisyui";\n' |
1564 | 1559 |
|
1565 | 1560 |
|
1566 | | -def _create_standard_config() -> None: |
1567 | | - """Create a standard Tailwind CSS config file with optimization.""" |
1568 | | - _create_standard_config_with_verbose(verbose=False) |
1569 | | - |
1570 | | - |
1571 | 1561 | def _create_standard_config_with_verbose(*, verbose: bool = False) -> None: |
1572 | 1562 | """Create a standard Tailwind CSS config file with optional verbose logging.""" |
1573 | 1563 | c = get_config() |
|
0 commit comments