+2024-04-30 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Remove remaining unused instance variables.
+ * pygnulib/GLModuleSystem.py (GLModule.__init__)
+ (GLModuleTable.__init__): Remove the unused GLFileSystem variable. These
+ classes perform lookups with a GLModuleSystem.
+ * pygnulib/GLTestDir.py (GLTestDir.__init__): Remove the unused
+ GLFileAssistant variable. The transformations it performs are not needed
+ in testdirs.
+
2024-04-29 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Add type hints to classes.
path: str
patched: bool
config: GLConfig
- filesystem: GLFileSystem
modulesystem: GLModuleSystem
sections: dict[str, str]
self.path = path
self.patched = patched
self.config = config
- self.filesystem = GLFileSystem(self.config)
self.modulesystem = GLModuleSystem(self.config)
# Read the module description file into memory.
with open(path, mode='r', newline='\n', encoding='utf-8') as file:
tests_modules: list[GLModule]
final_modules: list[GLModule]
config: GLConfig
- filesystem: GLFileSystem
modulesystem: GLModuleSystem
inc_all_direct_tests: bool
inc_all_indirect_tests: bool
raise TypeError('config must be a GLConfig, not %s'
% type(config).__name__)
self.config = config
- self.filesystem = GLFileSystem(self.config)
self.modulesystem = GLModuleSystem(self.config)
if type(inc_all_direct_tests) is not bool:
raise TypeError('inc_all_direct_tests must be a bool, not %s'
emitter: GLEmiter
filesystem: GLFileSystem
modulesystem: GLModuleSystem
- assistant: GLFileAssistant
makefiletable: GLMakefileTable
def __init__(self, config: GLConfig, testdir: str) -> None:
self.emitter = GLEmiter(self.config)
self.filesystem = GLFileSystem(self.config)
self.modulesystem = GLModuleSystem(self.config)
- self.assistant = GLFileAssistant(self.config)
self.makefiletable = GLMakefileTable(self.config)
# Subdirectory names.