Update linting due to new Ruff rules
This commit is contained in:
@@ -672,7 +672,7 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
self.spellCheckStateChanged.emit(state)
|
||||
self.spellCheckDocument()
|
||||
|
||||
logger.debug("Spell check is set to '%s'", str(state))
|
||||
logger.debug("Spell check is set to '%s'", state)
|
||||
|
||||
def spellCheckDocument(self) -> None:
|
||||
"""Rerun the highlighter to update spell checking status of the
|
||||
@@ -785,7 +785,7 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
elif action == nwDocAction.SC_SUB:
|
||||
self._wrapSelection(nwShortcode.SUB_O, nwShortcode.SUB_C)
|
||||
else:
|
||||
logger.debug("Unknown or unsupported document action '%s'", str(action))
|
||||
logger.debug("Unknown or unsupported document action '%s'", action)
|
||||
self._allowAutoReplace(True)
|
||||
return False
|
||||
|
||||
@@ -1750,7 +1750,7 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
elif action == nwDocAction.BLOCK_TXT:
|
||||
text = temp
|
||||
else:
|
||||
logger.error("Unknown or unsupported block format requested: '%s'", str(action))
|
||||
logger.error("Unknown or unsupported block format requested: '%s'", action)
|
||||
return nwDocAction.NO_ACTION, "", 0
|
||||
|
||||
return action, text, offset
|
||||
@@ -1760,7 +1760,7 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
cursor = self.textCursor()
|
||||
block = cursor.block()
|
||||
if not block.isValid():
|
||||
logger.debug("Invalid block selected for action '%s'", str(action))
|
||||
logger.debug("Invalid block selected for action '%s'", action)
|
||||
return False
|
||||
|
||||
action, text, offset = self._processBlockFormat(action, block.text())
|
||||
|
||||
Reference in New Issue
Block a user