Skip to content

Commit

Permalink
chore: remove outdated comment about fuzzy matching python versions (#…
Browse files Browse the repository at this point in the history
…1521)

Now that we're using a real PEP440 library, there's no need for this
comment.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
  • Loading branch information
willmurphyscode authored Sep 26, 2023
1 parent 6f898b5 commit 0085ddb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions grype/version/constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ func GetConstraint(constStr string, format Format) (Constraint, error) {
case RpmFormat:
return newRpmConstraint(constStr)
case PythonFormat:
// This is specific to PythonFormat so that it adheres to PEP440 and its odd corner-cases
// It is significantly odd enough, that the fuzzyConstraint is the best bet to compare versions.
// Although this will work in most cases, some oddities aren't supported, like:
// 1.0b2.post345.dev456 which is allowed by the spec. In that case (a dev release of a post release)
// the comparator will fail. See https://www.python.org/dev/peps/pep-0440
return newPep440Constraint(constStr)
case KBFormat:
return newKBConstraint(constStr)
Expand Down

0 comments on commit 0085ddb

Please sign in to comment.