From: Collin Funk Date: Mon, 8 Apr 2024 01:55:50 +0000 (-0700) Subject: gnulib-tool.py: Remove an unused and incorrect function. X-Git-Tag: v1.0~147 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f2a22fc726d3672dcf88f90e2e15a3b9f311d342;p=gnulib.git gnulib-tool.py: Remove an unused and incorrect function. * pygnulib/GLFileSystem.py (GLFileAssistant.removeFile): Remove this unused function. The correct method of removing an element from a list is to use the remove() function, not pop() which takes an index. --- diff --git a/ChangeLog b/ChangeLog index 1ab4414728..a6ba2ae992 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-08 Collin Funk + + gnulib-tool.py: Remove an unused and incorrect function. + * pygnulib/GLFileSystem.py (GLFileAssistant.removeFile): Remove this + unused function. The correct method of removing an element from a list + is to use the remove() function, not pop() which takes an index. + 2024-04-08 Collin Funk gnulib-tool.py: Omit some unnecessary list() calls around sorted(). diff --git a/pygnulib/GLFileSystem.py b/pygnulib/GLFileSystem.py index 551ae177e4..a463575f73 100644 --- a/pygnulib/GLFileSystem.py +++ b/pygnulib/GLFileSystem.py @@ -228,11 +228,6 @@ class GLFileAssistant: if file not in self.added: self.added += [file] - def removeFile(self, file: str) -> None: - '''Remove file from the list of added files.''' - if file in self.added: - self.added.pop(file) - def getFiles(self) -> list[str]: '''Return list of the added files.''' return list(self.added)