Skip to content

Commit

Permalink
Prefer range().__contains__ for bounds check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 26, 2022
1 parent 6193a69 commit c44e416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools/command/easy_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def finalize_options(self): # noqa: C901 # is too complex (25) # FIXME
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(
Expand Down

0 comments on commit c44e416

Please sign in to comment.