[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Omit some unnecessary list() calls around sorted().
From: |
Collin Funk |
Subject: |
gnulib-tool.py: Omit some unnecessary list() calls around sorted(). |
Date: |
Sun, 7 Apr 2024 19:03:01 -0700 |
User-agent: |
Mozilla Thunderbird |
Here is two janitorial work patches.
I remember an extra dict() call causing trouble with GLMakefileTable.
Removing the extra list() calls from sorted() seemed like a good place
to start cleaning up.
The second patch removes this function:
def removeFile(self, file: str) -> None:
'''Remove file from the list of added files.'''
if file in self.added:
self.added.pop(file)
This is incorrect since list.pop() takes an index and not a list
element. This function is unused so I've chosen to remove it. If it is
ever needed in the future the correct method would be list.remove().
Collin
0001-gnulib-tool.py-Omit-some-unnecessary-list-calls-arou.patch
Description: Text Data
0002-gnulib-tool.py-Remove-a-unused-and-incorrect-functio.patch
Description: Text Data