+2024-04-21 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Update type hints and docstring.
+ * pygnulib/GLImport.py (GLImport.execute): Update transformer type hint
+ to reflect change from sed expressions to re.sub() arguments.
+ (GLImport.prepare): Likewise. Don't reference sed or license
+ replacements in docstring.
+
2024-04-20 Bruno Haible <bruno@clisp.org>
signed-snan: Relicense under LGPLv2+.
else: # if self.config['dryrun']
print('Create %s' % srcpath)
- def prepare(self) -> tuple[dict[str, list[str]], dict[str, str]]:
- '''Make all preparations before the execution of the code.
- Returns filetable and sed transformers, which change the license.'''
+ def prepare(self) -> tuple[dict[str, list[str]], dict[str, tuple[re.Pattern, str] | None]]:
+ '''Perform preperations before GLImport.execute().
+ Returns a filetable and the transformers passed to GLFileAssistant().'''
destdir = self.config['destdir']
modules = list(self.config['modules'])
m4base = self.config['m4base']
result = tuple([filetable, transformers])
return result
- def execute(self, filetable: dict[str, list[str]], transformers: dict[str, str]) -> None:
+ def execute(self, filetable: dict[str, list[str]], transformers: dict[str, tuple[re.Pattern, str] | None]) -> None:
'''Perform operations on the lists of files, which are given in a special
format except filelist argument. Such lists of files can be created using
GLImport.prepare() function.'''