+2024-04-14 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Don't use mutable default arguments.
+ * pygnulib/GLFileSystem.py (GLFileAssistant.__init__): Set the default
+ argument for 'transformers' to None. If it is None then set it to an
+ empty dictionary in the body.
+
2024-04-13 Bruno Haible <bruno@clisp.org>
bootstrap: Implement phase 1 as documented in the --help output.
class GLFileAssistant:
'''GLFileAssistant is used to help with file processing.'''
- def __init__(self, config: GLConfig, transformers: dict[str, tuple[re.Pattern, str] | None] = dict()) -> None:
+ def __init__(self, config: GLConfig, transformers: dict[str, tuple[re.Pattern, str] | None] | None = None) -> None:
'''Create GLFileAssistant instance.
config stores information shared between classes.
if type(config) is not GLConfig:
raise TypeError('config must be a GLConfig, not %s'
% type(config).__name__)
- if type(transformers) is not dict:
+ if transformers == None:
+ transformers = dict()
+ elif type(transformers) is not dict:
raise TypeError('transformers must be a dict, not %s'
% type(transformers).__name__)
for key in ['lib', 'aux', 'main', 'tests']: