Skip to content

SQLC does not create __init__.py file #48

@Goldziher

Description

@Goldziher

Issue: The generated output package does not have an __init__.py file.

This file makes the output into a Python package; otherwise, it's just a bunch of files. Furthermore, the imports in the files do not work correctly without it.

The __init__.py file should include all the exports of the generated code and an __all__ = [...] variable inside the file (otherwise linters, mypy and intellij will complain).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions