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

Commit1324ce1

Browse files
chore: enable pylint check: "redefined-outer-name",
Enable the pylint check "redefined-outer-name" and fix the errorsdetected.
1 parent80aadaf commit1324ce1

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

‎gitlab/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ def _get_base_parser(add_help: bool = True) -> argparse.ArgumentParser:
252252
def_get_parser()->argparse.ArgumentParser:
253253
# NOTE: We must delay import of gitlab.v4.cli until now or
254254
# otherwise it will cause circular import errors
255-
importgitlab.v4.cli
255+
fromgitlab.v4importcliasv4_cli
256256

257257
parser=_get_base_parser()
258-
returngitlab.v4.cli.extend_parser(parser)
258+
returnv4_cli.extend_parser(parser)
259259

260260

261261
def_parse_value(v:Any)->Any:

‎gitlab/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ def __init__(
119119
raiseModuleNotFoundError(f"gitlab.v{self._api_version}.objects")
120120
# NOTE: We must delay import of gitlab.v4.objects until now or
121121
# otherwise it will cause circular import errors
122-
importgitlab.v4.objects
122+
fromgitlab.v4importobjects
123123

124-
objects=gitlab.v4.objects
125124
self._objects=objects
126125
self.user:Optional[objects.CurrentUser]=None
127126

@@ -214,9 +213,9 @@ def __setstate__(self, state: Dict[str, Any]) -> None:
214213
)# pragma: no cover, dead code currently
215214
# NOTE: We must delay import of gitlab.v4.objects until now or
216215
# otherwise it will cause circular import errors
217-
importgitlab.v4.objects
216+
fromgitlab.v4importobjects
218217

219-
self._objects=gitlab.v4.objects
218+
self._objects=objects
220219

221220
@property
222221
defurl(self)->str:

‎pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ disable = [
5959
"missing-module-docstring",
6060
"protected-access",
6161
"redefined-builtin",
62-
"redefined-outer-name",
6362
"signature-differs",
6463
"too-few-public-methods",
6564
"too-many-ancestors",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp