Fix flake8 config and style for flake8 6

pull/903/head
Graham Markall 2023-02-06 11:04:22 +00:00
parent b40a72ab4d
commit 1f4c3970b4
2 changed files with 16 additions and 9 deletions

21
.flake8
View File

@ -1,12 +1,19 @@
[flake8]
ignore =
E20, # Extra space in brackets
E231,E241, # Multiple spaces around ","
E26, # Comments
E731, # Assigning lambda expression
E741, # Ambiguous variable names
W503, # line break before binary operator
W504, # line break after binary operator
# Extra space in brackets
E20,
# Multiple spaces around ","
E231,E241,
# Comments
E26,
# Assigning lambda expression
E731,
# Ambiguous variable names
E741,
# line break before binary operator
W503,
# line break after binary operator
W504,
max-line-length = 80
exclude =

View File

@ -119,8 +119,8 @@ def _uniop_intrinsic_with_flag(opname):
raise TypeError(
"expected an integer type, got %s" %
operand.type)
if not(isinstance(flag.type, types.IntType) and
flag.type.width == 1):
if not (isinstance(flag.type, types.IntType) and
flag.type.width == 1):
raise TypeError("expected an i1 type, got %s" % flag.type)
fn = self.module.declare_intrinsic(
opname, [operand.type, flag.type])