From 2d038a5389997980d55d3715035d8058a73382d7 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sat, 20 Jun 2026 11:27:41 +0000 Subject: [PATCH] :bug: fix direct import lazy hook not registered --- codegen/templates/__init__.py.jinja | 4 ++++ .../githubkit_schemas/v2022_11_28/__init__.py | 4 ++++ .../githubkit_schemas/v2026_03_10/__init__.py | 4 ++++ .../githubkit_schemas/ghec_v2022_11_28/__init__.py | 4 ++++ .../githubkit_schemas/ghec_v2026_03_10/__init__.py | 4 ++++ .../githubkit-schemas/githubkit_schemas/latest/__init__.py | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/codegen/templates/__init__.py.jinja b/codegen/templates/__init__.py.jinja index db44d1010a..103b54401b 100644 --- a/codegen/templates/__init__.py.jinja +++ b/codegen/templates/__init__.py.jinja @@ -1,3 +1,7 @@ {% from "header.jinja" import header %} """{{ header() }}""" + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401 diff --git a/packages/githubkit-schemas-2022-11-28/githubkit_schemas/v2022_11_28/__init__.py b/packages/githubkit-schemas-2022-11-28/githubkit_schemas/v2022_11_28/__init__.py index 8e7622bb20..caf3ddf735 100644 --- a/packages/githubkit-schemas-2022-11-28/githubkit_schemas/v2022_11_28/__init__.py +++ b/packages/githubkit-schemas-2022-11-28/githubkit_schemas/v2022_11_28/__init__.py @@ -6,3 +6,7 @@ See https://github.com/github/rest-api-description for more information. """ + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401 diff --git a/packages/githubkit-schemas-2026-03-10/githubkit_schemas/v2026_03_10/__init__.py b/packages/githubkit-schemas-2026-03-10/githubkit_schemas/v2026_03_10/__init__.py index 8e7622bb20..caf3ddf735 100644 --- a/packages/githubkit-schemas-2026-03-10/githubkit_schemas/v2026_03_10/__init__.py +++ b/packages/githubkit-schemas-2026-03-10/githubkit_schemas/v2026_03_10/__init__.py @@ -6,3 +6,7 @@ See https://github.com/github/rest-api-description for more information. """ + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401 diff --git a/packages/githubkit-schemas-ghec-2022-11-28/githubkit_schemas/ghec_v2022_11_28/__init__.py b/packages/githubkit-schemas-ghec-2022-11-28/githubkit_schemas/ghec_v2022_11_28/__init__.py index 8e7622bb20..caf3ddf735 100644 --- a/packages/githubkit-schemas-ghec-2022-11-28/githubkit_schemas/ghec_v2022_11_28/__init__.py +++ b/packages/githubkit-schemas-ghec-2022-11-28/githubkit_schemas/ghec_v2022_11_28/__init__.py @@ -6,3 +6,7 @@ See https://github.com/github/rest-api-description for more information. """ + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401 diff --git a/packages/githubkit-schemas-ghec-2026-03-10/githubkit_schemas/ghec_v2026_03_10/__init__.py b/packages/githubkit-schemas-ghec-2026-03-10/githubkit_schemas/ghec_v2026_03_10/__init__.py index 8e7622bb20..caf3ddf735 100644 --- a/packages/githubkit-schemas-ghec-2026-03-10/githubkit_schemas/ghec_v2026_03_10/__init__.py +++ b/packages/githubkit-schemas-ghec-2026-03-10/githubkit_schemas/ghec_v2026_03_10/__init__.py @@ -6,3 +6,7 @@ See https://github.com/github/rest-api-description for more information. """ + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401 diff --git a/packages/githubkit-schemas/githubkit_schemas/latest/__init__.py b/packages/githubkit-schemas/githubkit_schemas/latest/__init__.py index 8e7622bb20..caf3ddf735 100644 --- a/packages/githubkit-schemas/githubkit_schemas/latest/__init__.py +++ b/packages/githubkit-schemas/githubkit_schemas/latest/__init__.py @@ -6,3 +6,7 @@ See https://github.com/github/rest-api-description for more information. """ + +# ensure the main package is imported +# so the lazy hooks are registered +import githubkit # noqa: F401