pylint: enable consider-using-(min|max)-builtin

There's only one case of each, in the same function, so I've handled
both in the same commit.
This commit is contained in:
Dylan Baker 2022-09-02 21:19:23 -07:00 committed by Eli Schwartz
parent 8c819ab805
commit 676e66f853
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
2 changed files with 2 additions and 8 deletions

View File

@ -14,8 +14,6 @@ disable=
cell-var-from-loop,
consider-merging-isinstance,
consider-using-f-string,
consider-using-max-builtin,
consider-using-min-builtin,
consider-using-with,
cyclic-import,
deprecated-decorator,

View File

@ -517,9 +517,7 @@ class CLikeCompiler(Compiler):
low = cur + 1
if low > maxint:
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
cur = cur * 2 + 1
if cur > maxint:
cur = maxint
cur = min(cur * 2 + 1, maxint)
high = cur
else:
high = cur = -1
@ -527,9 +525,7 @@ class CLikeCompiler(Compiler):
high = cur - 1
if high < minint:
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
cur = cur * 2
if cur < minint:
cur = minint
cur = max(cur * 2, minint)
low = cur
else:
# Sanity check limits given by user