[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/34] qapi/gen: Make _is_user_module() return bool
From: |
Markus Armbruster |
Subject: |
[PULL 25/34] qapi/gen: Make _is_user_module() return bool |
Date: |
Sat, 10 Oct 2020 11:54:55 +0200 |
From: John Snow <jsnow@redhat.com>
_is_user_module() returns thruth values. The next commit wants it to
return bool. Make it so.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201009161558.107041-27-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message rewritten]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/qapi/gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index fff0c0acb6..2c305c4f82 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -241,7 +241,7 @@ class QAPISchemaModularCVisitor(QAPISchemaVisitor):
@staticmethod
def _is_user_module(name):
- return name and not name.startswith('./')
+ return bool(name and not name.startswith('./'))
@staticmethod
def _is_builtin_module(name):
--
2.26.2
- [PULL 04/34] qapi: move generator entrypoint into package, (continued)
- [PULL 04/34] qapi: move generator entrypoint into package, Markus Armbruster, 2020/10/10
- [PULL 06/34] qapi: Remove wildcard includes, Markus Armbruster, 2020/10/10
- [PULL 27/34] qapi/gen.py: Remove unused parameter, Markus Armbruster, 2020/10/10
- [PULL 18/34] qapi: establish mypy type-checking baseline, Markus Armbruster, 2020/10/10
- [PULL 24/34] qapi/source.py: delint with pylint, Markus Armbruster, 2020/10/10
- [PULL 28/34] qapi/gen.py: update write() to be more idiomatic, Markus Armbruster, 2020/10/10
- [PULL 21/34] qapi/commands.py: Don't re-bind to variable of different type, Markus Armbruster, 2020/10/10
- [PULL 17/34] qapi/common.py: move build_params into gen.py, Markus Armbruster, 2020/10/10
- [PULL 20/34] qapi/events.py: Move comments into docstrings, Markus Armbruster, 2020/10/10
- [PULL 23/34] qapi/source.py: add type hint annotations, Markus Armbruster, 2020/10/10
- [PULL 25/34] qapi/gen: Make _is_user_module() return bool,
Markus Armbruster <=
- [PULL 29/34] qapi/gen.py: delint with pylint, Markus Armbruster, 2020/10/10
- [PULL 16/34] qapi/common.py: Convert comments into docstrings, and elaborate, Markus Armbruster, 2020/10/10
- [PULL 22/34] qapi/commands.py: add type hint annotations, Markus Armbruster, 2020/10/10
- [PULL 30/34] qapi/types.py: add type hint annotations, Markus Armbruster, 2020/10/10
- [PULL 26/34] qapi/gen.py: add type hint annotations, Markus Armbruster, 2020/10/10
- [PULL 33/34] qapi/visit.py: remove unused parameters from gen_visit_object, Markus Armbruster, 2020/10/10
- [PULL 34/34] qapi/visit.py: add type hint annotations, Markus Armbruster, 2020/10/10
- [PULL 09/34] qapi: add pylintrc, Markus Armbruster, 2020/10/10
- [PULL 32/34] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType, Markus Armbruster, 2020/10/10
- [PULL 19/34] qapi/events.py: add type hint annotations, Markus Armbruster, 2020/10/10