diff --git a/.flake8 b/.flake8 index 76b600637e..4344897b43 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -ignore = - E501, # line too long - W504 # line break after binary operator +# E501: line too long +# W504: line break after binary operator +ignore = E501,W504 exclude = ./third_party ./out diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 303f9cb0fe..a8e641ec20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v1 - name: install tools run: | - pip3 install flake8==3.7.8 + pip3 install flake8==7.3.0 sudo apt-get install clang-format - run: flake8 - run: ./scripts/clang-format-diff.sh diff --git a/test/gen-spec-js.py b/test/gen-spec-js.py index caba356879..470e4b30d8 100755 --- a/test/gen-spec-js.py +++ b/test/gen-spec-js.py @@ -318,7 +318,7 @@ def _NanBitmask(self, canonical, type_): # When checking for canonical NaNs, the value can differ only in the sign # bit from +nan. For arithmetic NaNs, the sign bit and the rest of the tag # can differ as well. - assert(type_ in ('f32', 'f64')) + assert type_ in ('f32', 'f64') if not canonical: return self._QuietNan(type_) @@ -329,7 +329,7 @@ def _NanBitmask(self, canonical, type_): self.lines.append(line) def _QuietNan(self, type_): - assert(type_ in ('f32', 'f64')) + assert type_ in ('f32', 'f64') if type_ == 'f32': line = 'i32.const 0x%x' % F32_QUIET_NAN else: diff --git a/test/run-tests.py b/test/run-tests.py index e17c499faf..fe1bd72998 100755 --- a/test/run-tests.py +++ b/test/run-tests.py @@ -168,7 +168,7 @@ class NoRoundtripError(Error): def Indent(s, spaces): - return ''.join(' ' * spaces + l for l in s.splitlines(1)) + return ''.join(' ' * spaces + line for line in s.splitlines(1)) def DiffLines(expected, actual): @@ -676,7 +676,7 @@ def Done(self): sys.stderr.write('\n') def _PrintShortStatus(self, info): - assert(self.isatty) + assert self.isatty total_duration = time.time() - self.start_time name = info.GetName() if info else '' if self.total - self.skipped: @@ -691,7 +691,7 @@ def _PrintShortStatus(self, info): sys.stderr.flush() def _Clear(self): - assert(self.isatty) + assert self.isatty sys.stderr.write('\r%s\r' % (' ' * self.last_length))