Skip to content

Commit 7c41fd3

Browse files
committed
fix the thing
1 parent 228a2dc commit 7c41fd3

File tree

7 files changed

+185
-235
lines changed

7 files changed

+185
-235
lines changed

docs/src/release_notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ These release notes are based on
88
sphinx-codeautolink adheres to
99
`Semantic Versioning <https://semver.org>`_.
1010

11+
Unreleased
12+
----------
13+
- Fix attribute and call after walrus leading parser error (:issue:`174`)
14+
- Improve error message on uncaught parsing errors (:issue:`177`)
15+
1116
0.17.0 (2025-02-18)
1217
-------------------
1318
Added

src/sphinx_codeautolink/extension/block.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def visit_literal_block(self, node: nodes.literal_block):
196196
"""Visit a generic literal block."""
197197
return self.parse_source(node, node.get("language", self.highlight_lang))
198198

199-
def parse_source( # noqa: C901
199+
def parse_source( # noqa: C901,PLR0912
200200
self, node: nodes.literal_block | nodes.doctest_block, language: str | None
201201
) -> None:
202202
"""Analyse Python code blocks."""
@@ -308,7 +308,7 @@ def _parsing_error_msg(self, error: Exception, language: str, source: str) -> st
308308
str(error) + f" in document {self.current_document!r}",
309309
f"Parsed source in `{language}` block:",
310310
source,
311-
""
311+
"",
312312
]
313313
)
314314

0 commit comments

Comments
 (0)