Skip to content

Commit

Permalink
Apply ruff rule RUF021
Browse files Browse the repository at this point in the history
RUF021 Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
  • Loading branch information
DimitriPapadopoulos committed Sep 27, 2024
1 parent b28230c commit 4cb9ee7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2779,13 +2779,13 @@ def _wrap_chunks(self, chunks):
if (
self.max_lines is None
or len(lines) + 1 < self.max_lines
or (
or ((
not chunks
or self.drop_whitespace
or (self.drop_whitespace
and len(chunks) == 1
and not chunks[0].strip()
and not chunks[0].strip())
)
and cur_len <= width
and cur_len <= width)
):
# Convert current line back to a string and store it in
# list of all lines (return value).
Expand Down

0 comments on commit 4cb9ee7

Please sign in to comment.