isnumeric -> isdigit

This commit is contained in:
Tzu-ping Chung
2018-07-26 14:04:55 +08:00
parent 5ff8bdeed3
commit ed8e862d29
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ class PythonVersion(object):
def matches(
self, major=None, minor=None, patch=None, pre=False, dev=False, arch=None
):
if arch and arch.isnumeric():
if arch and arch.isdigit():
arch = "{0}bit".format(arch)
return (
(major is None or self.major == major)
@@ -192,7 +192,7 @@ class PythonVersion(object):
@classmethod
def create(cls, **kwargs):
if "architecture" in kwargs:
if kwargs["architecture"].isnumeric():
if kwargs["architecture"].isdigit():
kwargs["architecture"] = "{0}bit".format(kwargs["architecture"])
return cls(**kwargs)
+1 -1
View File
@@ -66,7 +66,7 @@ class Finder(object):
):
if arch is None and "-" in major:
major, arch = major.rsplit("-", 1)
if not arch.isnumeric():
if not arch.isdigit():
major = "{0}-{1}".format(major, arch)
else:
arch = "{0}bit".format(arch)