Skip to content

Commit

Permalink
Add check before iterate over dist.requires
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed Jan 4, 2025
1 parent 3d5935f commit f2ec1e1
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ def get_dist_dependency_conflicts(
extra = "extra"
instruments = "instruments"
instruments_marker = {extra: instruments}
for dep in dist.requires:
if extra not in dep or instruments not in dep:
continue

req = Requirement(dep)
if req.marker.evaluate(instruments_marker):
instrumentation_deps.append(req)
if dist.requires:
for dep in dist.requires:
if extra not in dep or instruments not in dep:
continue

req = Requirement(dep)
if req.marker.evaluate(instruments_marker):
instrumentation_deps.append(req)

return get_dependency_conflicts(instrumentation_deps)

Expand Down

0 comments on commit f2ec1e1

Please sign in to comment.