Skip to content

Commit

Permalink
chore: fix some lints
Browse files Browse the repository at this point in the history
Comparing with > and max seem to have the same failure mode around one
of the comparands being None, so the PLR1730 lint fix seems safe.

Signed-off-by: Will Murphy <[email protected]>
  • Loading branch information
willmurphyscode committed Oct 3, 2024
1 parent 927265f commit 16dc74a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions example/awesome/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import orjson
import requests

from vunnel import utils, workspace

# NOTE, CHANGE ME!: this namespace should be unique to your provider and match expectations from
Expand Down
1 change: 1 addition & 0 deletions example/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import awesome
import orjson

from vunnel import provider, result

fakedata = [
Expand Down
3 changes: 1 addition & 2 deletions src/vunnel/providers/ubuntu/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ def map_parsed(parsed_cve: CVEFile, logger: logging.Logger | None = None): # no
# Check for max priority of all packages with it set
if p.priority:
pkg_sev = getattr(Severity, p.priority.capitalize())
if pkg_sev > r.Severity:
r.Severity = pkg_sev
r.Severity = max(pkg_sev, r.Severity)

return set(vulns.values())

Expand Down

0 comments on commit 16dc74a

Please sign in to comment.