Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 31, 2024
1 parent cbce03b commit 70edeb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions piptools/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,12 @@ def _do_resolve(

except MetadataGenerationFailed as err:
# Handle invalid metadata
match = re.search('name\s*=\s*"(\w+)"', str(err.__cause__.context))
match = re.search(r'name\s*=\s*"(\w+)"', str(err.__cause__.context))
if match:
partial_name = match.group(1)
possible_constraints = [c for c in self.constraints if partial_name in c.name]
possible_constraints = [
c for c in self.constraints if partial_name in c.name
]
for constraint in possible_constraints:
# Remove existing constraint that *might* cause the error
log.warning(
Expand Down

0 comments on commit 70edeb1

Please sign in to comment.