Skip to content

Version in VerisonRange"vers:nginx/* crashes for every version #30

Description

@Hritik14
>>> SemverVersion("1.0.0") in VersionRange.from_string("vers:nginx/*")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-12-b59bd155f0a0> in <module>
----> 1 SemverVersion("1.0.0") in VersionRange.from_string("vers:nginx/*")

~/Contrib/univers/src/univers/version_range.py in __contains__(self, version)
    159                 f"{version!r} is not of expected type: {self.version_class!r}",
    160             )
--> 161         return contains_version(version, self.constraints)
    162
    163     contains = __contains__

~/Contrib/univers/src/univers/version_constraint.py in contains_version(version, constraints)
    443     # Check is finished.
    444     if len(constraints) == 1:
--> 445         return version in constraints[0]
    446
    447     # If the "tested version" is equal to the any of the constraint version where

~/Contrib/univers/src/univers/version_constraint.py in __contains__(self, version)
    213
    214         if not isinstance(version, self.version.__class__):
--> 215             raise ValueError(
    216                 f"Cannot compare {version.__class__!r} instance "
    217                 f"with {self.version.__class__!r} instance."

ValueError: Cannot compare <class 'univers.versions.SemverVersion'> instance with <class 'NoneType'> instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions