Add support for operator != in package version (mostly for pytorch resolving)

This commit is contained in:
allegroai 2022-10-23 12:58:25 +03:00
parent e28048dc25
commit 3f7a4840cc

View File

@ -278,6 +278,8 @@ class SimpleVersion:
return version_a_key > version_b_key
if op == '<':
return version_a_key < version_b_key
if op == '!=':
return version_a_key != version_b_key
raise ValueError('Unrecognized comparison operator [{}]'.format(op))
@classmethod