diff options
| author | tgingold <tgingold@users.noreply.github.com> | 2022-12-02 07:31:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-02 07:31:12 +0100 |
| commit | 01660fb74049c5258f0e2868e0a0c5e89446de8d (patch) | |
| tree | b2c60ad75d6471b9eaff6cc8c9cc6696a2c234f6 /scripts/pnodes.py | |
| parent | d99076123a58f4d2a7e93706c5adecbd5b99ff8f (diff) | |
| parent | 3a1784a57516346e299e57c865399d6538df9e14 (diff) | |
| download | ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.gz ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.bz2 ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.zip | |
Merge pull request #2255 from Paebbels/paebbels/f-strings
f-strings
Diffstat (limited to 'scripts/pnodes.py')
| -rwxr-xr-x | scripts/pnodes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pnodes.py b/scripts/pnodes.py index ec00a54ac..29a2909c0 100755 --- a/scripts/pnodes.py +++ b/scripts/pnodes.py @@ -73,7 +73,7 @@ class ParseError(Exception): self.msg = msg def __str__(self): - return ("Parse error at {lr.filename}:{lr.lineno}: {msg}".format(lr=self.lr, msg=self.msg)) + return f"Parse error at {self.lr.filename}:{self.lr.lineno}: {self.msg}" # Return fields description. @@ -328,7 +328,7 @@ def read_nodes_fields(lr, names, fields, nodes, funcs_dict): cur_nodes = [] for (nm, fmt) in names: if fmt not in fields: - raise ParseError(lr, 'unknown format "{}"'.format(fmt)) + raise ParseError(lr, f'unknown format "{fmt}"') n = NodeDesc(nm, fmt, {x: None for x in fields[fmt]}, {}) nodes[nm] = n cur_nodes.append(n) |
