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

test(pylint): enable pylint "unused-argument" check#2100

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/pylint_2022-06-26
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes fromall 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
1 change: 1 addition & 0 deletionsgitlab/client.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -967,6 +967,7 @@ def http_post(
query_data=query_data,
post_data=post_data,
files=files,
raw=raw,
**kwargs,
)
try:
Expand Down
10 changes: 5 additions & 5 deletionsgitlab/v4/cli.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -381,7 +381,7 @@ def get_dict(

class JSONPrinter:
@staticmethod
def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
def display(d: Union[str, Dict[str, Any]], **_kwargs: Any) -> None:
import json # noqa

print(json.dumps(d))
Expand All@@ -390,7 +390,7 @@ def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
def display_list(
data: List[Union[str, gitlab.base.RESTObject]],
fields: List[str],
**kwargs: Any,
**_kwargs: Any,
) -> None:
import json # noqa

Expand All@@ -399,7 +399,7 @@ def display_list(

class YAMLPrinter:
@staticmethod
def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
def display(d: Union[str, Dict[str, Any]], **_kwargs: Any) -> None:
try:
import yaml # noqa

Expand All@@ -415,7 +415,7 @@ def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
def display_list(
data: List[Union[str, gitlab.base.RESTObject]],
fields: List[str],
**kwargs: Any,
**_kwargs: Any,
) -> None:
try:
import yaml # noqa
Expand All@@ -434,7 +434,7 @@ def display_list(


class LegacyPrinter:
def display(self,d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
def display(self,_d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
verbose = kwargs.get("verbose", False)
padding = kwargs.get("padding", 0)
obj: Optional[Union[Dict[str, Any], gitlab.base.RESTObject]] = kwargs.get("obj")
Expand Down
2 changes: 1 addition & 1 deletiongitlab/v4/objects/groups.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,7 +183,7 @@ def delete_ldap_group_link(
ifproviderisnotNone:
path+=f"/{provider}"
path+=f"/{cn}"
self.manager.gitlab.http_delete(path)
self.manager.gitlab.http_delete(path,**kwargs)

@cli.register_custom_action("Group")
@exc.on_http_error(exc.GitlabCreateError)
Expand Down
12 changes: 6 additions & 6 deletionsgitlab/v4/objects/jobs.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@ def cancel(self, **kwargs: Any) -> Dict[str, Any]:
GitlabJobCancelError: If the job could not be canceled
"""
path = f"{self.manager.path}/{self.encoded_id}/cancel"
result = self.manager.gitlab.http_post(path)
result = self.manager.gitlab.http_post(path, **kwargs)
if TYPE_CHECKING:
assert isinstance(result, dict)
return result
Expand All@@ -46,7 +46,7 @@ def retry(self, **kwargs: Any) -> Dict[str, Any]:
GitlabJobRetryError: If the job could not be retried
"""
path = f"{self.manager.path}/{self.encoded_id}/retry"
result = self.manager.gitlab.http_post(path)
result = self.manager.gitlab.http_post(path, **kwargs)
if TYPE_CHECKING:
assert isinstance(result, dict)
return result
Expand All@@ -64,7 +64,7 @@ def play(self, **kwargs: Any) -> None:
GitlabJobPlayError: If the job could not be triggered
"""
path = f"{self.manager.path}/{self.encoded_id}/play"
self.manager.gitlab.http_post(path)
self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabJobEraseError)
Expand All@@ -79,7 +79,7 @@ def erase(self, **kwargs: Any) -> None:
GitlabJobEraseError: If the job could not be erased
"""
path = f"{self.manager.path}/{self.encoded_id}/erase"
self.manager.gitlab.http_post(path)
self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabCreateError)
Expand All@@ -94,7 +94,7 @@ def keep_artifacts(self, **kwargs: Any) -> None:
GitlabCreateError: If the request could not be performed
"""
path = f"{self.manager.path}/{self.encoded_id}/artifacts/keep"
self.manager.gitlab.http_post(path)
self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabCreateError)
Expand All@@ -109,7 +109,7 @@ def delete_artifacts(self, **kwargs: Any) -> None:
GitlabDeleteError: If the request could not be performed
"""
path = f"{self.manager.path}/{self.encoded_id}/artifacts"
self.manager.gitlab.http_delete(path)
self.manager.gitlab.http_delete(path, **kwargs)

@cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabGetError)
Expand Down
2 changes: 1 addition & 1 deletiongitlab/v4/objects/merge_request_approvals.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ def set_approvers(
ar.save()
returnar
# if there was no rule matching the rule name, create a new one
returnapproval_rules.create(data=data)
returnapproval_rules.create(data=data,**kwargs)


classProjectMergeRequestApprovalRule(SaveMixin,ObjectDeleteMixin,RESTObject):
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/pipelines.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,7 +71,7 @@ def cancel(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
GitlabPipelineCancelError: If the request failed
"""
path = f"{self.manager.path}/{self.encoded_id}/cancel"
return self.manager.gitlab.http_post(path)
return self.manager.gitlab.http_post(path, **kwargs)

@cli.register_custom_action("ProjectPipeline")
@exc.on_http_error(exc.GitlabPipelineRetryError)
Expand All@@ -86,7 +86,7 @@ def retry(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
GitlabPipelineRetryError: If the request failed
"""
path = f"{self.manager.path}/{self.encoded_id}/retry"
return self.manager.gitlab.http_post(path)
return self.manager.gitlab.http_post(path, **kwargs)


class ProjectPipelineManager(RetrieveMixin, CreateMixin, DeleteMixin, RESTManager):
Expand Down
4 changes: 2 additions & 2 deletionsgitlab/v4/objects/projects.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -464,7 +464,7 @@ def upload(

url = f"/projects/{self.encoded_id}/uploads"
file_info = {"file": (filename, filedata)}
data = self.manager.gitlab.http_post(url, files=file_info)
data = self.manager.gitlab.http_post(url, files=file_info, **kwargs)

if TYPE_CHECKING:
assert isinstance(data, dict)
Expand DownExpand Up@@ -504,7 +504,7 @@ def snapshot(
"""
path = f"/projects/{self.encoded_id}/snapshot"
result = self.manager.gitlab.http_get(
path, streamed=streamed, raw=True, **kwargs
path, streamed=streamed, raw=True,wiki=wiki,**kwargs
)
if TYPE_CHECKING:
assert isinstance(result, requests.Response)
Expand Down
2 changes: 1 addition & 1 deletiongitlab/v4/objects/services.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -267,7 +267,7 @@ def get(
returncast(ProjectService,super().get(id=id,lazy=lazy,**kwargs))

@cli.register_custom_action("ProjectServiceManager")
defavailable(self,**kwargs:Any)->List[str]:
defavailable(self)->List[str]:
"""List the services known by python-gitlab.
Returns:
Expand Down
2 changes: 0 additions & 2 deletionspyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -70,8 +70,6 @@ disable = [
"too-many-locals",
"too-many-statements",
"unsubscriptable-object",
"unused-argument",

]

[tool.pytest.ini_options]
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp