Skip to content

Commit

Permalink
🐛 Fix: missing ghes lazy loading (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Jun 11, 2024
1 parent 69e352c commit 4fd53da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
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,
)

0 comments on commit 4fd53da

Please sign in to comment.