[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/19] qapi/schema: fix QAPISchemaEntity.__repr__()
From: |
John Snow |
Subject: |
[PATCH 01/19] qapi/schema: fix QAPISchemaEntity.__repr__() |
Date: |
Wed, 15 Nov 2023 20:43:32 -0500 |
This needs parentheses to work how you want it to:
>>> "%s-%s-%s" % 'a', 'b', 'c'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not enough arguments for format string
>>> "%s-%s-%s" % ('a', 'b', 'c')
'a-b-c'
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qapi/schema.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py
index d739e558e9e..c79747b2a15 100644
--- a/scripts/qapi/schema.py
+++ b/scripts/qapi/schema.py
@@ -76,7 +76,7 @@ def __init__(self, name: str, info, doc, ifcond=None,
features=None):
def __repr__(self):
if self.name is None:
return "<%s at 0x%x>" % (type(self).__name__, id(self))
- return "<%s:%s at 0x%x>" % type(self).__name__, self.name, id(self)
+ return "<%s:%s at 0x%x>" % (type(self).__name__, self.name, id(self))
def c_name(self):
return c_name(self.name)
--
2.41.0
- Re: [PATCH 08/19] qapi/schema: add static typing and assertions to lookup_type(), (continued)
[PATCH 03/19] qapi/schema: name QAPISchemaInclude entities, John Snow, 2023/11/15
[PATCH 12/19] qapi/schema: split "checked" field into "checking" and "checked", John Snow, 2023/11/15
[PATCH 01/19] qapi/schema: fix QAPISchemaEntity.__repr__(),
John Snow <=
[PATCH 06/19] qapi/schema: adjust type narrowing for mypy's benefit, John Snow, 2023/11/15
[PATCH 10/19] qapi/schema: make QAPISchemaArrayType.element_type non-Optional, John Snow, 2023/11/15