Skip to content

Commit 4fd53da

Browse files
authored
🐛 Fix: missing ghes lazy loading (#108)
1 parent 69e352c commit 4fd53da

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ repos:
2121
- id: ruff-format
2222
stages: [commit]
2323

24-
- repo: https://github.com/pre-commit/mirrors-prettier
25-
rev: v4.0.0-alpha.8
26-
hooks:
27-
- id: prettier
28-
stages: [commit]
29-
3024
- repo: https://github.com/nonebot/nonemoji
3125
rev: v0.1.4
3226
hooks:

githubkit/lazy_module.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
LAZY_MODULES = (
1111
r"^githubkit\.rest$",
12-
r"^githubkit\.versions\.v[^.]+\.models$",
13-
r"^githubkit\.versions\.v[^.]+\.webhooks$",
14-
r"^githubkit\.versions\.latest\.models$",
15-
r"^githubkit\.versions\.latest\.types$",
16-
r"^githubkit\.versions\.latest\.webhooks$",
12+
r"^githubkit\.versions\.[^.]+\.models$",
13+
r"^githubkit\.versions\.[^.]+\.types$",
14+
r"^githubkit\.versions\.[^.]+\.webhooks$",
15+
# r"^githubkit\.versions\.latest\.models$",
16+
# r"^githubkit\.versions\.latest\.types$",
17+
# r"^githubkit\.versions\.latest\.webhooks$",
1718
)
1819

1920

tests/test_versions/test_models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from githubkit.versions.latest.models import ( # noqa: F401
2+
SimpleUser as SimpleUserLatest,
3+
)
4+
from githubkit.versions.v2022_11_28.models import ( # noqa: F401
5+
SimpleUser as SimpleUserV2022_11_28,
6+
)
7+
from githubkit.versions.ghec_v2022_11_28.models import ( # noqa: F401
8+
SimpleUser as SimpleUserGhecV2022_11_28,
9+
)

tests/test_versions/test_types.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from githubkit.versions.latest.types import ( # noqa: F401
2+
SimpleUserType as SimpleUserLatestType,
3+
)
4+
from githubkit.versions.v2022_11_28.types import ( # noqa: F401
5+
SimpleUserType as SimpleUserV2022_11_28Type,
6+
)
7+
from githubkit.versions.ghec_v2022_11_28.types import ( # noqa: F401
8+
SimpleUserType as SimpleUserGhecV2022_11_28Type,
9+
)

0 commit comments

Comments
 (0)