Skip to content

Commit

Permalink
fix ruff --preview errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 3, 2024
1 parent e21a466 commit 2fcde84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pyglossary/plugins/dict_org_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def open(self, filename: str) -> None:
# TODO: add another bool flag to only remove html tags that are not
# supported by GtkTextView

def _defiEscapeFunc(self, defi: str) -> str:
@staticmethod
def _defiEscapeFunc(defi: str) -> str:
return defi.replace("\r", "")

def write(self) -> "Generator[None, EntryType, None]":
Expand Down
3 changes: 2 additions & 1 deletion pyglossary/plugins/lingoes_ldf.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def finish(self) -> None:
def open(self, filename: str) -> None:
self._filename = filename

def _defiEscapeFunc(self, defi: str) -> str:
@staticmethod
def _defiEscapeFunc(defi: str) -> str:
return defi.replace("\n", "<br/>")

def write(self) -> "Generator[None, EntryType, None]":
Expand Down
2 changes: 0 additions & 2 deletions pyglossary/text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,3 @@ def replacePostSpaceChar(st: str, ch: str) -> str:
.replace(f"{ch} ", f"{ch} ")
.removesuffix(" ")
)


0 comments on commit 2fcde84

Please sign in to comment.