Skip to content

Commit 5250881

Browse files
Update from debuggingbook
1 parent 131580c commit 5250881

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

notebooks/shared/bookutils/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ def show_ast(tree: AST) -> Optional[Any]:
164164
print(ast.dump(tree))
165165
return None
166166

167-
# Note: For Python >=3.12, this needs the patched `showast2` module
168-
# e.g. git+https://github.com/andreas-zeller/show_ast.git@andreas
169-
import showast2
167+
# For Python >=3.12,
168+
# we need the patched `showast2` module instead of `showast`
169+
# see git+https://github.com/andreas-zeller/show_ast.git@andreas
170+
import showast2 # type: ignore
170171
return showast2.show_ast(tree)
171172

172173
# Escaping unicode characters into ASCII for user-facing strings

0 commit comments

Comments
 (0)