Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit888f332

Browse files
fix(api): services: add missinglazy parameter
Commit8da0b75 added the `lazy`parameter to the services `get()` method but missed then using the`lazy` parameter when it called `super(...).get(...)`Closes:#1828
1 parent4a000b6 commit888f332

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

‎gitlab/v4/objects/services.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
GitLab API:
3+
https://docs.gitlab.com/ee/api/integrations.html
4+
"""
5+
16
fromtypingimportAny,cast,Dict,List,Optional,Union
27

38
fromgitlabimportcli
@@ -275,7 +280,10 @@ def get(
275280
GitlabAuthenticationError: If authentication is not correct
276281
GitlabGetError: If the server cannot perform the request
277282
"""
278-
obj=cast(ProjectService,super(ProjectServiceManager,self).get(id,**kwargs))
283+
obj=cast(
284+
ProjectService,
285+
super(ProjectServiceManager,self).get(id,lazy=lazy,**kwargs),
286+
)
279287
obj.id=id
280288
returnobj
281289

‎tests/functional/api/test_services.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
GitLab API:
3+
https://docs.gitlab.com/ee/api/integrations.html
4+
"""
5+
6+
importgitlab
7+
8+
9+
deftest_services(project):
10+
service=project.services.get("jira",lazy=True)
11+
assertisinstance(service,gitlab.v4.objects.ProjectService)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp