aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-05-19 14:39:44 -0400
committerMarkus Armbruster <armbru@redhat.com>2021-05-20 11:28:28 +0200
commit43b1be65f07c57ef2a4a6012e263677cf812c7e1 (patch)
tree01fa5c7beb9b8af5868a22d4d6027cbe0c29e929 /scripts/qapi
parent234dce2c2d93cfff7433c0fd244ef207c7eace2b (diff)
qapi/parser: Use @staticmethod where appropriate
No self, no thank you! (Quiets pylint warnings.) Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210519183951.3946870-9-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi')
-rw-r--r--scripts/qapi/parser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py
index 4959630ce6..7c71866195 100644
--- a/scripts/qapi/parser.py
+++ b/scripts/qapi/parser.py
@@ -130,7 +130,8 @@ class QAPISchemaParser:
"documentation for '%s' is not followed by the definition"
% doc.symbol)
- def _include(self, include, info, incl_fname, previously_included):
+ @staticmethod
+ def _include(include, info, incl_fname, previously_included):
incl_abs_fname = os.path.abspath(incl_fname)
# catch inclusion cycle
inf = info
@@ -151,7 +152,8 @@ class QAPISchemaParser:
f"can't read include file '{incl_fname}': {err.strerror}"
) from err
- def _check_pragma_list_of_str(self, name, value, info):
+ @staticmethod
+ def _check_pragma_list_of_str(name, value, info):
if (not isinstance(value, list)
or any([not isinstance(elt, str) for elt in value])):
raise QAPISemError(