From 6e3f3006393897ab9e58c5cbc6d2e8d8c21f4989 Mon Sep 17 00:00:00 2001 From: Martijn Stegeman Date: Thu, 9 Oct 2025 21:58:02 +0200 Subject: [PATCH] Fix getting the value of Constant `item.value` is a Constant here, and the attribute `.s` has been removed in Python 3.14, which makes this part crash. The attribute `.value` can now be used, which was in fact already used two lines above this change. --- dessert/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dessert/rewrite.py b/dessert/rewrite.py index e84172d1..1d9e2ca2 100644 --- a/dessert/rewrite.py +++ b/dessert/rewrite.py @@ -571,7 +571,7 @@ def run(self, mod: ast.Module) -> None: and isinstance(item.value, ast.Constant) and isinstance(item.value.value, str) ): - doc = item.value.s + doc = item.value.value if self.is_rewrite_disabled(doc): return expect_docstring = False