(self, version: str)
return version
Remove any non-numeric, non-point version suffixes.
Remove any non-numeric, non-point version suffixes.
Remove any non - numeric non - point version suffixes .
def _sanitize_version(self, version: str) -> str:
        """Remove any non-numeric, non-point version suffixes."""
        m = self.__strip_version.match(version)
        if m:
            # Ensure that there isn't a trailing '.', such as an input like
            # `1.2.3.git-1234`
            return m.group(0).rstrip('.')
        return version
def _sanitize_version ( self , version : str ) -> str : m = self . __strip_version . match ( version ) if m : # Ensure that there isn't a trailing '.', such as an input like # `1.2.3.git-1234` return m . group ( 0 ) . rstrip ( '.' ) return version