Skip to content

Fix: missing ghes lazy loading #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ repos:
- id: ruff-format
stages: [commit]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
stages: [commit]

- repo: https://github.com/nonebot/nonemoji
rev: v0.1.4
hooks:
Expand Down
11 changes: 6 additions & 5 deletions githubkit/lazy_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

LAZY_MODULES = (
r"^githubkit\.rest$",
r"^githubkit\.versions\.v[^.]+\.models$",
r"^githubkit\.versions\.v[^.]+\.webhooks$",
r"^githubkit\.versions\.latest\.models$",
r"^githubkit\.versions\.latest\.types$",
r"^githubkit\.versions\.latest\.webhooks$",
r"^githubkit\.versions\.[^.]+\.models$",
r"^githubkit\.versions\.[^.]+\.types$",
r"^githubkit\.versions\.[^.]+\.webhooks$",
# r"^githubkit\.versions\.latest\.models$",
# r"^githubkit\.versions\.latest\.types$",
# r"^githubkit\.versions\.latest\.webhooks$",
)


Expand Down
9 changes: 9 additions & 0 deletions tests/test_versions/test_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from githubkit.versions.latest.models import ( # noqa: F401
SimpleUser as SimpleUserLatest,
)
from githubkit.versions.v2022_11_28.models import ( # noqa: F401
SimpleUser as SimpleUserV2022_11_28,
)
from githubkit.versions.ghec_v2022_11_28.models import ( # noqa: F401
SimpleUser as SimpleUserGhecV2022_11_28,
)
9 changes: 9 additions & 0 deletions tests/test_versions/test_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from githubkit.versions.latest.types import ( # noqa: F401
SimpleUserType as SimpleUserLatestType,
)
from githubkit.versions.v2022_11_28.types import ( # noqa: F401
SimpleUserType as SimpleUserV2022_11_28Type,
)
from githubkit.versions.ghec_v2022_11_28.types import ( # noqa: F401
SimpleUserType as SimpleUserGhecV2022_11_28Type,
)
Loading