Skip to content

Commit

Permalink
Apply ruff/flake8-simplify rule SIM212
Browse files Browse the repository at this point in the history
SIM212 Use `if` instead of `if not`
  • Loading branch information
DimitriPapadopoulos committed Sep 27, 2024
1 parent 78aab35 commit 002597c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabulate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,7 @@ def _main():
elif opt in ["-h", "--help"]:
print(usage)
sys.exit(0)
files = [sys.stdin] if not args else args
files = args or [sys.stdin]
with sys.stdout if outfile == "-" else open(outfile, "w") as out:
for f in files:
if f == "-":
Expand Down

0 comments on commit 002597c

Please sign in to comment.