VersionMeta#

class ansys.tools.versioning.utils.VersionMeta#

Metaclass for version comparison.

Implements modification to magic methods.

Overview#

__le__

Less equal.

__lt__

Less than.

__ge__

Greater equal.

__gt__

Greater than.

__eq__

Equal method.

__ne__

Not equal.

__hash__

Call the underlying __hash__ method.

Import detail#

from ansys.tools.versioning.utils import VersionMeta

Method detail#

VersionMeta.__le__(__x: str | int) bool#

Less equal.

If compared against a string which contains ‘dev’ it will always evaluate to True. If compared against an int, it will perform a classic ‘less equal’ operation.

VersionMeta.__lt__(__x: str | int) bool#

Less than.

If compared against a string which contains ‘dev’ it will always evaluate to True. If compared against an int, it will perform a classic ‘less than’ operation.

VersionMeta.__ge__(__x: str | int) bool#

Greater equal.

If compared against a string which contains ‘dev’ it will always evaluate to False. If compared against an int, it will perform a classic ‘greater equal’ operation.

VersionMeta.__gt__(__x: str | int) bool#

Greater than.

If compared against a string which contains ‘dev’ it will always evaluate to False. If compared against an int, it will perform a classic ‘greater than’ operation.

VersionMeta.__eq__(__x: object) bool#

Equal method.

If compared against a string which contains ‘dev’ it will always evaluate to False. If compared against an int, it will perform a classic ‘equal’ operation.

VersionMeta.__ne__(__x: object) bool#

Not equal.

If compared against a string which contains ‘dev’ it will always evaluate to not ‘equal’ operation (True). If compared against an int, it will perform a classic ‘not equal’ operation.

VersionMeta.__hash__() int#

Call the underlying __hash__ method.