Skip to content

Commit

Permalink
refactor: remove an untaken branch in annotate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Nov 5, 2024
1 parent 864ef60 commit 84baf6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coverage/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ def annotate_file(self, fr: FileReporter, analysis: Analysis) -> None:
if self.directory:
ensure_dir(self.directory)
dest_file = os.path.join(self.directory, flat_rootname(fr.relative_filename()))
if dest_file.endswith("_py"):
dest_file = dest_file[:-3] + ".py"
dest_file += ",cover"
assert dest_file.endswith("_py")
dest_file = dest_file[:-3] + ".py"
else:
dest_file = fr.filename + ",cover"
dest_file = fr.filename
dest_file += ",cover"

with open(dest_file, "w", encoding="utf-8") as dest:
i = j = 0
Expand Down

0 comments on commit 84baf6e

Please sign in to comment.