+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.
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
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
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
if char not in GLModule.shell_id_chars:
valid_shell_id = False
break
- identifier = None
if valid_shell_id:
identifier = self.getName()
else:
if char not in GLModule.shell_id_chars:
valid_shell_id = False
break
- identifier = None
if valid_shell_id:
identifier = self.getName()
else:
if char not in GLModule.shell_id_chars:
valid_shell_id = False
break
- identifier = None
if valid_shell_id:
identifier = self.getName()
else: