Skip to content

Commit

Permalink
chore: fix pylint message overlapping-except (#886)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Troeger <[email protected]>
  • Loading branch information
jenstroeger authored Oct 2, 2024
1 parent b23fab1 commit aebf879
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ fail-under = 10.0
suggestion-mode = true # Remove this setting when pylint v4 is released.
load-plugins = [
"pylint.extensions.for_any_all",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.set_membership",
]
disable = [
Expand Down
2 changes: 1 addition & 1 deletion src/macaron/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,6 @@ def create_defaults(output_path: str, cwd_path: str) -> bool:
)
return True
# We catch OSError to support errors on different platforms.
except (OSError, shutil.Error) as error:
except OSError as error:
logger.error("Failed to create %s: %s.", os.path.relpath(dest_path, cwd_path), error)
return False
2 changes: 1 addition & 1 deletion src/macaron/dependency_analyzer/cyclonedx.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def deserialize_bom_json(file_path: Path) -> Bom:
# This method is injected into the Bom class that is annotated by ``serializable`` but mypy is not
# able to detect that.
bom_from_json = Bom.from_json(json.loads(json_data)) # type: ignore[attr-defined]
except (ValueError, AttributeError, json.JSONDecodeError) as error:
except (ValueError, AttributeError) as error:
raise CycloneDXParserError(f"Could not process the dependencies at {file_path}: {error}") from None

if isinstance(bom_from_json, Bom):
Expand Down

0 comments on commit aebf879

Please sign in to comment.