i_vis/core/version.py
def less_than(self: Version, other: Version, attrs: Sequence[str]) -> bool:
    """Compare versions based on attributes.

    ``self`` and ``other`` be the same type.

    Args:
        self: A :class:`Version` instance to compare.
        other: An other :class:`Version` instance to compare against.
        attrs: Attributes to compare.

    Returns:
        True, if ``self`` is older than ``other``. False, otherwise.
    """

    for attr in attrs:
        attr1 = getattr(self, attr, None)
        attr2 = getattr(other, attr, None)

        if attr1 is not None:
            if attr2 is None:
                return False
            if attr1 < attr2:
                return True
            if attr1 > attr2:
                return False
        else:
            if attr2 is not None:
                return True
    return False
Compare versions based on attributes.

    ``self`` and ``other`` be the same type.

    Args:
        self: A :class:`Version` instance to compare.
        other: An other :class:`Version` instance to compare against.
        attrs: Attributes to compare.

    Returns:
        True, if ``self`` is older than ``other``. False, otherwise.
    
Compare versions based on attributes.
Compare versions based on attributes .
def less_than(self: Version, other: Version, attrs: Sequence[str]) -> bool:
    for attr in attrs:
        attr1 = getattr(self, attr, None)
        attr2 = getattr(other, attr, None)
        if attr1 is not None:
            if attr2 is None:
                return False
            if attr1 < attr2:
                return True
            if attr1 > attr2:
                return False
        else:
            if attr2 is not None:
                return True
    return False
def less_than ( self : Version , other : Version , attrs : Sequence [ str ] ) -> bool : for attr in attrs : attr1 = getattr ( self , attr , None ) attr2 = getattr ( other , attr , None ) if attr1 is not None : if attr2 is None : return False if attr1 < attr2 : return True if attr1 > attr2 : return False else : if attr2 is not None : return True return False
Compare versions based on attributes.
Compare versions based on attributes .
"""Compare versions based on attributes.

    ``self`` and ``other`` be the same type.

    Args:
        self: A :class:`Version` instance to compare.
        other: An other :class:`Version` instance to compare against.
        attrs: Attributes to compare.

    Returns:
        True, if ``self`` is older than ``other``. False, otherwise.
    """
True, if ``self`` is older than ``other``. False, otherwise.
True if ` ` self ` ` is older than ` ` other ` ` . False otherwise .
self
Version
A :class:`Version` instance to compare.
A : class : ` Version ` instance to compare .
other
Version
An other :class:`Version` instance to compare against.
An other : class : ` Version ` instance to compare against .
attrs
Sequence[str]
Attributes to compare.
Attributes to compare .