From 51f0ead16d60c63d1b069f807e3513bba11d8947 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 28 Nov 2022 00:32:17 +0100 Subject: Converted string formatting to f-strings. --- pyGHDL/dom/Attribute.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'pyGHDL/dom/Attribute.py') diff --git a/pyGHDL/dom/Attribute.py b/pyGHDL/dom/Attribute.py index 3b3f3b40e..808f0a6a3 100644 --- a/pyGHDL/dom/Attribute.py +++ b/pyGHDL/dom/Attribute.py @@ -121,30 +121,14 @@ class AttributeSpecification(VHDLModel_AttributeSpecification, DOMMixin): print("[NOT IMPLEMENTED] Signature name in attribute specifications.") else: position = Position.parse(name) - raise DOMException( - "Unknown name kind '{kind}' in attribute specification '{attr}' at {file}:{line}:{column}.".format( - kind=nameKind.name, - attr=attributeNode, - file=position.Filename, - line=position.Line, - column=position.Column, - ) - ) + raise DOMException(f"Unknown name kind '{nameKind.name}' in attribute specification '{attributeNode}' at {position.Filename}:{position.Line}:{position.Column}.") entityClassToken = nodes.Get_Entity_Class(attributeNode) try: entityClass = _TOKEN_TRANSLATION[entityClassToken] except KeyError: position = Position.parse(attributeNode) - raise DOMException( - "Unknown token '{token}' in attribute specification for entity class '{entityClass}' at {file}:{line}:{column}.".format( - token=entityClassToken.name, - entityClass=attributeNode, - file=position.Filename, - line=position.Line, - column=position.Column, - ) - ) + raise DOMException(f"Unknown token '{entityClassToken.name}' in attribute specification for entity class '{attributeNode}' at {position.Filename}:{position.Line}:{position.Column}.") expression = GetExpressionFromNode(nodes.Get_Expression(attributeNode)) -- cgit v1.2.3