summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-02-26 12:44:11 -0500
committerJason R. Coombs <jaraco@jaraco.com>2022-02-26 12:44:16 -0500
commitc44e416b44e5e7126f435a7c0b9adc9b88b85cbd (patch)
tree0dfbc93f9c986024588b7268928d14ee96f1a671 /setuptools/command/easy_install.py
parent6193a69d8608b6ca7e0e5ac1223d63abb55eee3b (diff)
downloadpython-setuptools-git-c44e416b44e5e7126f435a7c0b9adc9b88b85cbd.tar.gz
Prefer range().__contains__ for bounds check.
Diffstat (limited to 'setuptools/command/easy_install.py')
-rw-r--r--setuptools/command/easy_install.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 5b73e6e9..07b45e59 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -358,7 +358,7 @@ class easy_install(Command):
if not isinstance(self.optimize, int):
try:
self.optimize = int(self.optimize)
- if not (0 <= self.optimize <= 2):
+ if self.optimize not in range(3):
raise ValueError
except ValueError as e:
raise DistutilsOptionError(