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.
pull/10889/head
Dylan Baker 3 years ago committed by Eli Schwartz
parent 8c819ab805
commit 676e66f853
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      .pylintrc
  2. 8
      mesonbuild/compilers/mixins/clike.py

@ -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,

@ -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

Loading…
Cancel
Save