aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom/Attribute.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-11-28 00:32:17 +0100
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2022-11-30 23:32:47 +0100
commit51f0ead16d60c63d1b069f807e3513bba11d8947 (patch)
tree50094f57aeb7f9562341908864624199f4d7bc4a /pyGHDL/dom/Attribute.py
parent473ed87bb505916e74441f01508c109bf39b30a7 (diff)
downloadghdl-51f0ead16d60c63d1b069f807e3513bba11d8947.tar.gz
ghdl-51f0ead16d60c63d1b069f807e3513bba11d8947.tar.bz2
ghdl-51f0ead16d60c63d1b069f807e3513bba11d8947.zip
Converted string formatting to f-strings.
Diffstat (limited to 'pyGHDL/dom/Attribute.py')
-rw-r--r--pyGHDL/dom/Attribute.py20
1 files changed, 2 insertions, 18 deletions
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))