We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fb8420 commit 2e51a64Copy full SHA for 2e51a64
Lib/annotationlib.py
@@ -609,7 +609,7 @@ def _template_to_ast(template):
609
# literals. Return the most accurate AST we can. See issue for details.
610
611
# If any expr is empty or whitespace only, we cannot convert to a literal.
612
- if any(not part.expression.strip() for part in template.interpolations):
+ if any(part.expression.strip() == "" for part in template.interpolations):
613
return _template_to_ast_constructor(template)
614
615
try:
0 commit comments