From 5ebc579a0fa405c3df0ffa6dcd1819ac63d3ed92 Mon Sep 17 00:00:00 2001 From: andrew000 <11490628+andrew000@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:23:17 +0200 Subject: [PATCH] Fix `tests/test_extract/test_cli_extractor.py:313: DeprecationWarning: Name.__init__ missing 1 required positional argument: 'id'. This will become an error in Python 3.15.` --- tests/test_extract/test_cli_extractor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_extract/test_cli_extractor.py b/tests/test_extract/test_cli_extractor.py index 0d79742..20a4f13 100644 --- a/tests/test_extract/test_cli_extractor.py +++ b/tests/test_extract/test_cli_extractor.py @@ -300,7 +300,7 @@ def test_i18n_matcher_skips_call_with_no_args(setup_environment: tuple[Path, Pat code_path, output_path = setup_environment matcher = I18nMatcher(code_path) - node = ast.Call(func=ast.Attribute(value=ast.Name(id="i18n"), attr="get"), args=[]) + node = ast.Call(func=ast.Attribute(value=ast.Name(id="i18n"), attr="get"), args=[], keywords=[]) matcher.visit_Call(node) assert len(matcher.fluent_keys) == 0 @@ -310,7 +310,11 @@ def test_generic_visit_called_on_else_block(setup_environment: tuple[Path, Path] code_path, output_path = setup_environment matcher = I18nMatcher(code_path) - node = ast.Call(func=ast.Attribute(value=ast.Name(id="i18n"), attr="get"), args=[ast.Name()]) + node = ast.Call( + func=ast.Attribute(value=ast.Name(id="i18n"), attr="get"), + args=[ast.Name(id="i18n")], + keywords=[], + ) with patch.object(matcher, "generic_visit", wraps=matcher.generic_visit) as mock_generic_visit: matcher.visit_Call(node)