torchoutil.pyoutil.semver module¶
- class Version(
- version: Version,
- /,
- class Version(
- version_str: str,
- /,
- class Version( )
- class Version( )
- class Version(
- major: int,
- minor: int,
- patch: int,
- prerelease: int | str | None | List[int | str] = None,
- buildmetadata: int | str | None | List[int | str] = None,
Bases:
objectVersion utility class following Semantic Versioning (SemVer) spec.
Version format is: MAJOR.MINOR.PATCH[-PRERELEASE][+BUILDMETADATA]
- classmethod python(
- releaselevel_in_metadata: bool = False,
Create an instance of Version with Python version.
Note: Python ‘micro’ value is mapped to ‘patch’.
- to_dict(
- exclude_none: bool = True,