Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit b76b5d4

Browse files
committed
fix: Fix import sorting in template files
- Fix import order in CLI template to comply with Ruff's isort rules - Fix import formatting in test template files - Ensure generated projects pass ruff check and format --check - Remove extra blank lines that caused import sorting violations
1 parent f6e3719 commit b76b5d4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

  • {{cookiecutter.project_slug}}

{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug.replace('-', '_')}}/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{%- if cookiecutter.command_line_interface != "none" %}
22
"""Command line interface for {{ cookiecutter.project_name }}."""
3-
43
{%- if cookiecutter.command_line_interface == "typer" %}
4+
55
from typing import Annotated
66

77
import typer
88

99
from . import __version__
1010
from .core import hello_world
1111

12-
1312
app = typer.Typer(
1413
name="{{ cookiecutter.project_slug }}",
1514
help="{{ cookiecutter.project_short_description }}",

{{cookiecutter.project_slug}}/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Tests for CLI functionality."""
22
{%- if cookiecutter.use_pytest == "y" and cookiecutter.command_line_interface != "none" %}
33
{%- if cookiecutter.command_line_interface == "typer" %}
4+
45
from typer.testing import CliRunner
56

67
from {{ cookiecutter.project_slug.replace('-', '_') }}.cli import app
78

8-
99
runner = CliRunner()
1010

1111

0 commit comments

Comments
 (0)