From 64eb59f3b2a2677b7e6d7e1090b0189e4f9ce93d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 7 Apr 2024 18:55:50 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Remove a 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. --- ChangeLog | 7 +++++++ pygnulib/GLFileSystem.py | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fd962ecbb..cb563b3830 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-07 Collin Funk + + gnulib-tool.py: Remove a 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-07 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) -- 2.44.0