Skip to content

Missing F403 in noqa comment causes ruff check to fail #92

@DominikCywinski

Description

@DominikCywinski

In what type of project did the bug occur?
api-microservice

Describe the bug
The generated app/init.py file has an incomplete noqa comment that causes ruff check to fail. Line 4 includes # noqa: F401 but is missing F403, which is also triggered by the wildcard import.

To Reproduce

  1. Generate template
  2. uv run pre-commit run --all-files

Expected result
The noqa comment should suppress both F401 and F403 errors.

Actual result

F403 `from app.models import *` used; unable to detect undefined names
 --> app\__init__.py:4:5
  |
3 | try:
4 |     from app.models import *  # noqa: F401
  |     ^^^^^^^^^^^^^^^^^^^^^^^^
5 | except ImportError:
6 |     traceback.print_exc()

Proposed solution
from app.models import * # noqa: F401, F403

Environment (please complete the following information):

  • OS: Windows 11
  • Python version: 3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions