From a2eaaa26feac2d42a7d61d5190039fdedf518989 Mon Sep 17 00:00:00 2001 From: James Westman Date: Fri, 28 Apr 2023 20:41:25 -0500 Subject: [PATCH] Rename property to avoid conflict TranslatedWithContext.context conflicted with AstNode.context --- blueprintcompiler/language/values.py | 2 +- blueprintcompiler/outputs/xml/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprintcompiler/language/values.py b/blueprintcompiler/language/values.py index 596823d..b9eb877 100644 --- a/blueprintcompiler/language/values.py +++ b/blueprintcompiler/language/values.py @@ -51,7 +51,7 @@ class TranslatedWithContext(AstNode): return self.tokens["string"] @property - def context(self) -> str: + def translate_context(self) -> str: return self.tokens["context"] diff --git a/blueprintcompiler/outputs/xml/__init__.py b/blueprintcompiler/outputs/xml/__init__.py index 42d9b21..607cc36 100644 --- a/blueprintcompiler/outputs/xml/__init__.py +++ b/blueprintcompiler/outputs/xml/__init__.py @@ -151,7 +151,7 @@ class XmlOutput(OutputFormat): else: return { "translatable": "true", - "context": translated.child.context + "context": translated.child.translate_context if isinstance(translated.child, TranslatedWithContext) else None, }