>From e3274bb212cabe199c755382decf72bfa0e88a7e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 2 Apr 2024 01:18:59 +0200 Subject: [PATCH 2/4] gnulib-tool.py: Remove unused imports. * pygnulib/GLFileSystem.py: Remove unused imports. * pygnulib/GLEmiter.py: Likewise. (GLEmiter.autoconfSnippets): Fix type assertion message. --- ChangeLog | 5 +++++ pygnulib/GLEmiter.py | 3 +-- pygnulib/GLFileSystem.py | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48db28222d..7b730e56eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-04-02 Bruno Haible + gnulib-tool.py: Remove unused imports. + * pygnulib/GLFileSystem.py: Remove unused imports. + * pygnulib/GLEmiter.py: Likewise. + (GLEmiter.autoconfSnippets): Fix type assertion message. + gnulib-tool.py: Fix some IDE warnings. * HACKING: Update configuration of warnings. diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 7211e24cbe..aff00eddf6 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -28,7 +28,6 @@ from .GLConfig import GLConfig from .GLModuleSystem import GLModule from .GLModuleSystem import GLModuleTable from .GLMakefileTable import GLMakefileTable -from .GLFileSystem import GLFileAssistant #=============================================================================== @@ -290,7 +289,7 @@ class GLEmiter(object): if type(module) is not GLModule: raise TypeError('each referenceable module must be a GLModule instance') if type(moduletable) is not GLModuleTable: - raise TypeError('moduletable must be a GLFileAssistant, not %s' + raise TypeError('moduletable must be a GLModuleTable, not %s' % type(moduletable).__name__) if type(verifier) is not int: raise TypeError('verifier must be an int, not %s' diff --git a/pygnulib/GLFileSystem.py b/pygnulib/GLFileSystem.py index 4709b0b092..10b5ad6d59 100644 --- a/pygnulib/GLFileSystem.py +++ b/pygnulib/GLFileSystem.py @@ -20,10 +20,8 @@ from __future__ import annotations #=============================================================================== import os import re -import codecs import filecmp import subprocess as sp -from enum import Enum from . import constants from pygnulib.enums import CopyAction from .GLError import GLError -- 2.34.1