Skip to content

Commit

Permalink
Clarify formatter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattias Rosell authored and pelme committed Oct 24, 2024
1 parent 9d6c608 commit c2bff6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htpy/html2htpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def format(self, s: str) -> str:
)
if result.returncode == self.error_return_code:
_printerr("Black failed to parse the input. The output will be left unformatted.")
_printerr(
"This is likely a bug in html2htpy. Please report this as an issue to htpy: https://github.com/pelme/htpy/issues."
)
return s
return result.stdout.decode("utf8")

Expand All @@ -195,6 +198,9 @@ def format(self, s: str) -> str:
)
if result.returncode == self.error_return_code:
_printerr("Ruff failed to parse the input. The output will be left unformatted.")
_printerr(
"This is likely a bug in html2htpy. Please report this as an issue to htpy: https://github.com/pelme/htpy/issues."
)
return s
return result.stdout.decode("utf8")

Expand Down

0 comments on commit c2bff6c

Please sign in to comment.