Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version library conflict #1026

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Fix version library conflict #1026

merged 3 commits into from
Oct 11, 2023

Conversation

chen3feng
Copy link
Owner

  • distutils is deprecated and was removed since python 3.12
  • packanging is not a stdlib

- distutils is deprected and removed from 3.12
- packaging is not a stdlib
for i, obj in enumerate(components):
try:
components[i] = int(obj)
except ValueError:

Check notice

Code scanning / CodeQL

Empty except Note

'except' clause does nothing but pass and there is no explanatory comment.
# instance of your version class)


class StrictVersion(Version):

Check warning

Code scanning / CodeQL

`__eq__` not overridden when adding attributes Warning

The class 'StrictVersion' does not override
'__eq__'
, but adds the new attribute
version
.
The class 'StrictVersion' does not override
'__eq__'
, but adds the new attribute
version
.
The class 'StrictVersion' does not override
'__eq__'
, but adds the new attribute
prerelease
.
The class 'StrictVersion' does not override
'__eq__'
, but adds the new attribute
prerelease
.
# have a conception that matches common notions about version numbers.


class LooseVersion(Version):

Check warning

Code scanning / CodeQL

`__eq__` not overridden when adding attributes Warning

The class 'LooseVersion' does not override
'__eq__'
, but adds the new attribute
vstring
.
The class 'LooseVersion' does not override
'__eq__'
, but adds the new attribute
version
.
def __repr__(self):
return "LooseVersion ('%s')" % str(self)

def _cmp(self, other):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
@chen3feng chen3feng merged commit 77bbb05 into master Oct 11, 2023
8 checks passed
@chen3feng chen3feng deleted the fix-version-library-conflict branch October 11, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant