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

Commit618267c

Browse files
nejchJohnVillalovos
authored andcommitted
chore: don't explicitly pass args to super()
1 parente8031f4 commit618267c

File tree

7 files changed

+11
-13
lines changed

7 files changed

+11
-13
lines changed

‎docs/ext/docstrings.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ def _build_doc(self, tmpl, **kwargs):
4848
def__init__(
4949
self,docstring,config=None,app=None,what="",name="",obj=None,options=None
5050
):
51-
super(GitlabDocstring,self).__init__(
52-
docstring,config,app,what,name,obj,options
53-
)
51+
super().__init__(docstring,config,app,what,name,obj,options)
5452

5553
ifname.startswith("gitlab.v4.objects")andname.endswith("Manager"):
5654
self._parsed_lines.extend(self._build_doc("manager_tmpl.j2",cls=self._obj))

‎gitlab/base.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,21 +167,21 @@ def __eq__(self, other: object) -> bool:
167167
returnNotImplemented
168168
ifself.get_id()andother.get_id():
169169
returnself.get_id()==other.get_id()
170-
returnsuper(RESTObject,self)==other
170+
returnsuper()==other
171171

172172
def__ne__(self,other:object)->bool:
173173
ifnotisinstance(other,RESTObject):
174174
returnNotImplemented
175175
ifself.get_id()andother.get_id():
176176
returnself.get_id()!=other.get_id()
177-
returnsuper(RESTObject,self)!=other
177+
returnsuper()!=other
178178

179179
def__dir__(self)->Iterable[str]:
180-
returnset(self.attributes).union(super(RESTObject,self).__dir__())
180+
returnset(self.attributes).union(super().__dir__())
181181

182182
def__hash__(self)->int:
183183
ifnotself.get_id():
184-
returnsuper(RESTObject,self).__hash__()
184+
returnsuper().__hash__()
185185
returnhash(self.get_id())
186186

187187
def_create_managers(self)->None:

‎gitlab/v4/objects/appearance.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def update(
5656
"""
5757
new_data=new_dataor {}
5858
data=new_data.copy()
59-
returnsuper(ApplicationAppearanceManager,self).update(id,data,**kwargs)
59+
returnsuper().update(id,data,**kwargs)
6060

6161
defget(
6262
self,id:Optional[Union[int,str]]=None,**kwargs:Any

‎gitlab/v4/objects/files.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def save( # type: ignore
5757
self.branch=branch
5858
self.commit_message=commit_message
5959
self.file_path=utils.EncodedId(self.file_path)
60-
super(ProjectFile,self).save(**kwargs)
60+
super().save(**kwargs)
6161

6262
@exc.on_http_error(exc.GitlabDeleteError)
6363
# NOTE(jlvillal): Signature doesn't match DeleteMixin.delete() so ignore

‎gitlab/v4/objects/keys.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get(
2121
self,id:Optional[Union[int,str]]=None,lazy:bool=False,**kwargs:Any
2222
)->Key:
2323
ifidisnotNone:
24-
returncast(Key,super(KeyManager,self).get(id,lazy=lazy,**kwargs))
24+
returncast(Key,super().get(id,lazy=lazy,**kwargs))
2525

2626
if"fingerprint"notinkwargs:
2727
raiseAttributeError("Missing attribute: id or fingerprint")

‎gitlab/v4/objects/services.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def get(
282282
"""
283283
obj=cast(
284284
ProjectService,
285-
super(ProjectServiceManager,self).get(id,lazy=lazy,**kwargs),
285+
super().get(id,lazy=lazy,**kwargs),
286286
)
287287
obj.id=id
288288
returnobj
@@ -308,7 +308,7 @@ def update(
308308
GitlabUpdateError: If the server cannot perform the request
309309
"""
310310
new_data=new_dataor {}
311-
result=super(ProjectServiceManager,self).update(id,new_data,**kwargs)
311+
result=super().update(id,new_data,**kwargs)
312312
self.id=id
313313
returnresult
314314

‎gitlab/v4/objects/settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def update(
113113
data=new_data.copy()
114114
if"domain_whitelist"indataanddata["domain_whitelist"]isNone:
115115
data.pop("domain_whitelist")
116-
returnsuper(ApplicationSettingsManager,self).update(id,data,**kwargs)
116+
returnsuper().update(id,data,**kwargs)
117117

118118
defget(
119119
self,id:Optional[Union[int,str]]=None,**kwargs:Any

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp