Skip to content

Commit

Permalink
fix: remove useless else (RUF047)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jan 26, 2025
1 parent fb4a68c commit 4d8ffc0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions meshmode/discretization/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,7 @@ def write_vtk_file(self, file_name, names_and_fields,
# we simply overwrite below, no need to remove
pass
else:
raise FileExistsError("output file '%s' already exists"
% file_name)
raise FileExistsError(f"output file '{file_name}' already exists")

if (responsible_for_writing_par_manifest
and par_manifest_filename is not None):
Expand All @@ -831,10 +830,8 @@ def write_vtk_file(self, file_name, names_and_fields,
# we simply overwrite below, no need to remove
pass
else:
raise FileExistsError("output file '%s' already exists"
% par_manifest_filename)
else:
pass
raise FileExistsError(
f"output file '{par_manifest_filename}' already exists")

# }}}

Expand Down

0 comments on commit 4d8ffc0

Please sign in to comment.