]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Remove some unused variable assignments.
authorCollin Funk <collin.funk1@gmail.com>
Sun, 14 Apr 2024 16:37:17 +0000 (09:37 -0700)
committerBruno Haible <bruno@clisp.org>
Sun, 14 Apr 2024 17:50:14 +0000 (19:50 +0200)
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove unused
variable.
* pygnulib/GLInfo.py (GLInfo.date, GLInfo.version): Remove assignments
to variables unconditionally set in try, except blocks.
* pygnulib/GLModuleSystem.py (GLModule.getConditionalName)
(GLModule.getShellFunc, GLModule.getShellVar): Likewise.

ChangeLog
pygnulib/GLEmiter.py
pygnulib/GLInfo.py
pygnulib/GLModuleSystem.py

index 4333a003a50f0aef9e22bb49f65ccbd2790adc2f..0e24ce55d7b41d64d7aa9a51b4234e58c04637a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-04-14  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Remove some unused variable assignments.
+       * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove unused
+       variable.
+       * pygnulib/GLInfo.py (GLInfo.date, GLInfo.version): Remove assignments
+       to variables unconditionally set in try, except blocks.
+       * pygnulib/GLModuleSystem.py (GLModule.getConditionalName)
+       (GLModule.getShellFunc, GLModule.getShellVar): Likewise.
+
 2024-04-14  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Don't use mutable default arguments.
index 6edad6619edd9fb4486ee8dd87c1fb2f81e7cc44..558f130bbbb105a835b1b1b156a0abc632c28709 100644 (file)
@@ -324,7 +324,6 @@ class GLEmiter:
             for module in modules:
                 if module_filter(module):
                     if moduletable.isConditional(module):
-                        shellvar = module.getShellVar()
                         emit += '  %s=false\n' % module.getShellVar()
             # Emit the autoconf code for the conditional modules, each in a separate
             # function. This makes it possible to support cycles among conditional
index 716d1ddf0d59d714d5848443d5801d415cdc6c1d..c7de90376a1637fa398576ac4f0e4aa5da7f6d18 100644 (file)
@@ -89,14 +89,12 @@ class GLInfo:
     def date(self) -> str:
         '''Return formatted string which contains date and time in GMT format.'''
         if isdir(DIRS['git']):
-            have_git = None
             try:
                 sp.check_call(['git', '--version'], stdout=sp.DEVNULL)
                 have_git = True
             except:
                 have_git = False
             if have_git:
-                have_GNU_date = None
                 try:
                     sp.check_call(['date', '--version'], stdout=sp.DEVNULL)
                     have_GNU_date = True
@@ -332,7 +330,6 @@ Report bugs to <bug-gnulib@gnu.org>.'''
     def version(self) -> str:
         '''Return formatted string which contains git version.'''
         if isdir(DIRS['git']):
-            have_git = None
             try:
                 sp.check_call(['git', '--version'], stdout=sp.DEVNULL)
                 have_git = True
index 6639c9a6e8eb59f601d5bbbb3a2f2304f37f1274..2551e316e13f8af2eb0ca1f7b12fb0a515b89be5 100644 (file)
@@ -396,7 +396,6 @@ class GLModule:
             if char not in GLModule.shell_id_chars:
                 valid_shell_id = False
                 break
-        identifier = None
         if valid_shell_id:
             identifier = self.getName()
         else:
@@ -414,7 +413,6 @@ class GLModule:
             if char not in GLModule.shell_id_chars:
                 valid_shell_id = False
                 break
-        identifier = None
         if valid_shell_id:
             identifier = self.getName()
         else:
@@ -432,7 +430,6 @@ class GLModule:
             if char not in GLModule.shell_id_chars:
                 valid_shell_id = False
                 break
-        identifier = None
         if valid_shell_id:
             identifier = self.getName()
         else: