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:
parent
8c819ab805
commit
676e66f853
|
@ -14,8 +14,6 @@ disable=
|
||||||
cell-var-from-loop,
|
cell-var-from-loop,
|
||||||
consider-merging-isinstance,
|
consider-merging-isinstance,
|
||||||
consider-using-f-string,
|
consider-using-f-string,
|
||||||
consider-using-max-builtin,
|
|
||||||
consider-using-min-builtin,
|
|
||||||
consider-using-with,
|
consider-using-with,
|
||||||
cyclic-import,
|
cyclic-import,
|
||||||
deprecated-decorator,
|
deprecated-decorator,
|
||||||
|
|
|
@ -517,9 +517,7 @@ class CLikeCompiler(Compiler):
|
||||||
low = cur + 1
|
low = cur + 1
|
||||||
if low > maxint:
|
if low > maxint:
|
||||||
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
|
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
|
||||||
cur = cur * 2 + 1
|
cur = min(cur * 2 + 1, maxint)
|
||||||
if cur > maxint:
|
|
||||||
cur = maxint
|
|
||||||
high = cur
|
high = cur
|
||||||
else:
|
else:
|
||||||
high = cur = -1
|
high = cur = -1
|
||||||
|
@ -527,9 +525,7 @@ class CLikeCompiler(Compiler):
|
||||||
high = cur - 1
|
high = cur - 1
|
||||||
if high < minint:
|
if high < minint:
|
||||||
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
|
raise mesonlib.EnvironmentException('Cross-compile check overflowed')
|
||||||
cur = cur * 2
|
cur = max(cur * 2, minint)
|
||||||
if cur < minint:
|
|
||||||
cur = minint
|
|
||||||
low = cur
|
low = cur
|
||||||
else:
|
else:
|
||||||
# Sanity check limits given by user
|
# Sanity check limits given by user
|
||||||
|
|
Loading…
Reference in New Issue