[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 29/36] qapi/gen.py: Remove unused parameter
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v5 29/36] qapi/gen.py: Remove unused parameter |
Date: |
Wed, 07 Oct 2020 14:22:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
John Snow <jsnow@redhat.com> writes:
> module_basename doesn't use the 'what' argument, so remove it.
_module_dirname(), I suppose.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> Reviewed-by: Cleber Rosa <crosa@redhat.com>
> ---
> scripts/qapi/gen.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
> index d0391cd8718..3624162bb77 100644
> --- a/scripts/qapi/gen.py
> +++ b/scripts/qapi/gen.py
> @@ -259,7 +259,7 @@ def _is_user_module(name: Optional[str]) -> bool:
> def _is_builtin_module(name: Optional[str]) -> bool:
> return not name
>
> - def _module_dirname(self, what: str, name: Optional[str]) -> str:
> + def _module_dirname(self, name: Optional[str]) -> str:
> if self._is_user_module(name):
> return os.path.dirname(name)
> return ''
> @@ -277,7 +277,7 @@ def _module_basename(self, what: str, name:
> Optional[str]) -> str:
> return ret
>
> def _module_filename(self, what: str, name: Optional[str]) -> str:
> - return os.path.join(self._module_dirname(what, name),
> + return os.path.join(self._module_dirname(name),
> self._module_basename(what, name))
>
> def _add_module(self, name: Optional[str], blurb: str) -> None:
- Re: [PATCH v5 24/36] qapi/source.py: add type hint annotations, (continued)
[PATCH v5 27/36] qapi/gen.py: add type hint annotations, John Snow, 2020/10/05
[PATCH v5 31/36] qapi/gen.py: delint with pylint, John Snow, 2020/10/05
[PATCH v5 29/36] qapi/gen.py: Remove unused parameter, John Snow, 2020/10/05
- Re: [PATCH v5 29/36] qapi/gen.py: Remove unused parameter,
Markus Armbruster <=
[PATCH v5 30/36] qapi/gen.py: update write() to be more idiomatic, John Snow, 2020/10/05
[PATCH v5 32/36] qapi/types.py: add type hint annotations, John Snow, 2020/10/05
[PATCH v5 34/36] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType, John Snow, 2020/10/05