diff mbox series

[v2,27/38] qapi/gen.py: Remove unused parameter

Message ID 20200922210101.4081073-28-jsnow@redhat.com
State New
Headers show
Series qapi: static typing conversion, pt1 | expand

Commit Message

John Snow Sept. 22, 2020, 9 p.m. UTC
module_basename doesn't use the 'what' argument, so remove it.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 scripts/qapi/gen.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eduardo Habkost Sept. 23, 2020, 3:19 p.m. UTC | #1
On Tue, Sep 22, 2020 at 05:00:50PM -0400, John Snow wrote:
> module_basename doesn't use the 'what' argument, so remove it.

> 

> Signed-off-by: John Snow <jsnow@redhat.com>


Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>


-- 
Eduardo
Cleber Rosa Sept. 24, 2020, midnight UTC | #2
On Tue, Sep 22, 2020 at 05:00:50PM -0400, John Snow wrote:
> module_basename doesn't use the 'what' argument, so remove it.

> 

> Signed-off-by: John Snow <jsnow@redhat.com>


Reviewed-by: Cleber Rosa <crosa@redhat.com>
diff mbox series

Patch

diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index df8cf8271c..ba32f776e6 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -261,7 +261,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 ''
@@ -279,7 +279,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: