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

Appearance settings

Commit 1a2781e

Browse filesBrowse files
chore: enable pylint check "raise-missing-from"
Enable the pylint check "raise-missing-from" and fix errors detected.
1 parent 50fdbc4 commit 1a2781e
Copy full SHA for 1a2781e

File tree

Expand file treeCollapse file tree

3 files changed

+6
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-5
lines changed
Open diff view settings
Collapse file

‎gitlab/config.py‎

Copy file name to clipboardExpand all lines: gitlab/config.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def _get_config_files(
5656
try:
5757
resolved = _resolve_file(config_file)
5858
except OSError as e:
59-
raise GitlabConfigMissingError(f"Cannot read config from file: {e}")
59+
raise GitlabConfigMissingError(
60+
f"Cannot read config from file: {e}"
61+
) from e
6062
resolved_files.append(resolved)
6163

6264
return resolved_files
@@ -69,7 +71,7 @@ def _get_config_files(
6971
except OSError as e:
7072
raise GitlabConfigMissingError(
7173
f"Cannot read config from PYTHON_GITLAB_CFG: {e}"
72-
)
74+
) from e
7375

7476
for config_file in _DEFAULT_FILES:
7577
try:
Collapse file

‎gitlab/v4/objects/packages.py‎

Copy file name to clipboardExpand all lines: gitlab/v4/objects/packages.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def upload(
7373
try:
7474
with open(path, "rb") as f:
7575
file_data = f.read()
76-
except OSError:
77-
raise exc.GitlabUploadError(f"Failed to read package file {path}")
76+
except OSError as e:
77+
raise exc.GitlabUploadError(f"Failed to read package file {path}") from e
7878

7979
url = f"{self._computed_path}/{package_name}/{package_version}/{file_name}"
8080
server_data = self.gitlab.http_put(url, post_data=file_data, raw=True, **kwargs)
Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ disable = [
6161
"no-else-return",
6262
"no-self-use",
6363
"protected-access",
64-
"raise-missing-from",
6564
"redefined-builtin",
6665
"redefined-outer-name",
6766
"signature-differs",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.