Skip to content
Snippets Groups Projects
Commit 43b1be65 authored by John Snow's avatar John Snow Committed by Markus Armbruster
Browse files

qapi/parser: Use @staticmethod where appropriate


No self, no thank you!

(Quiets pylint warnings.)

Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
Message-Id: <20210519183951.3946870-9-jsnow@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent 234dce2c
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,8 @@ def reject_expr_doc(doc):
"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 @@ def _include(self, include, info, incl_fname, previously_included):
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment