Skip to content

Commit 6b7ead8

Browse files
farhanclaude
andcommitted
fix: wrap over-length line flagged by pylint line-too-long
Extract the context slice into a local so the error message f-string fits within the 120-char limit. pylint (C0301) now owns line-length since ruff cedes E501. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7c95bc5 commit 6b7ead8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

xblocks_contrib/annotatable/annotatable.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,5 +302,6 @@ def definition_to_xml(self, resource_fs):
302302
# re-raise
303303
lines = self.data.split("\n")
304304
line, offset = err.position # lint-amnesty, pylint: disable=unpacking-non-sequence
305-
msg = f"Unable to create xml for block {self.usage_key}. Context: '{lines[line - 1][offset - 40 : offset + 40]}'"
305+
context = lines[line - 1][offset - 40 : offset + 40]
306+
msg = f"Unable to create xml for block {self.usage_key}. Context: '{context}'"
306307
raise SerializationError(self.usage_key, msg) from err

0 commit comments

Comments
 (0)