diff mbox series

[auh,05/11] modules/utils/git.py: cleanup the __init__ function

Message ID 20260311063557.229656-5-Qi.Chen@windriver.com
State New
Headers show
Series [auh,01/11] upgrade-helper.py: remove unused self.poky_git settings | expand

Commit Message

ChenQi March 11, 2026, 6:35 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

The "dir" is not a good parameter name as "dir" is a built-in function
of python. Use repodir instead.

Besides, the super() call is not needed as Git inherits object
directly.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 modules/utils/git.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/modules/utils/git.py b/modules/utils/git.py
index 0482d26..b504ab0 100644
--- a/modules/utils/git.py
+++ b/modules/utils/git.py
@@ -30,9 +30,8 @@  from utils.bitbake import bb
 from errors import Error
 
 class Git(object):
-    def __init__(self, dir):
-        self.repo_dir = dir
-        super(Git, self).__init__()
+    def __init__(self, repodir):
+        self.repo_dir = repodir
 
     def _cmd(self, operation):
         os.chdir(self.repo_dir)