Skip to content

Commit aebf879

Browse files
authored
chore: fix pylint message overlapping-except (#886)
Signed-off-by: Jens Troeger <[email protected]>
1 parent b23fab1 commit aebf879

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ fail-under = 10.0
213213
suggestion-mode = true # Remove this setting when pylint v4 is released.
214214
load-plugins = [
215215
"pylint.extensions.for_any_all",
216+
"pylint.extensions.overlapping_exceptions",
216217
"pylint.extensions.set_membership",
217218
]
218219
disable = [

src/macaron/config/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ def create_defaults(output_path: str, cwd_path: str) -> bool:
170170
)
171171
return True
172172
# We catch OSError to support errors on different platforms.
173-
except (OSError, shutil.Error) as error:
173+
except OSError as error:
174174
logger.error("Failed to create %s: %s.", os.path.relpath(dest_path, cwd_path), error)
175175
return False

src/macaron/dependency_analyzer/cyclonedx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def deserialize_bom_json(file_path: Path) -> Bom:
8686
# This method is injected into the Bom class that is annotated by ``serializable`` but mypy is not
8787
# able to detect that.
8888
bom_from_json = Bom.from_json(json.loads(json_data)) # type: ignore[attr-defined]
89-
except (ValueError, AttributeError, json.JSONDecodeError) as error:
89+
except (ValueError, AttributeError) as error:
9090
raise CycloneDXParserError(f"Could not process the dependencies at {file_path}: {error}") from None
9191

9292
if isinstance(bom_from_json, Bom):

0 commit comments

Comments
 (0)