@@ -844,7 +844,7 @@ def test_validate_references_false_with_duplicates():
844844def test_get_translation_errors_missing_variable ():
845845 """Test that missing variables are reported via errors parameter."""
846846 bundle = fluent .Bundle ("en" , [data_dir / "variables.ftl" ])
847- errors = []
847+ errors : list [ fluent . FormatError ] = []
848848
849849 # Call get_translation without providing required variable
850850 result = bundle .get_translation ("greeting" , errors = errors )
@@ -864,11 +864,13 @@ def test_get_translation_errors_missing_variable():
864864def test_get_translation_errors_invalid_variable_type ():
865865 """Test that invalid variable types are reported via errors parameter."""
866866 bundle = fluent .Bundle ("en" , [data_dir / "variables.ftl" ])
867- errors = []
867+ errors : list [ fluent . FormatError ] = []
868868
869869 # Pass a list instead of a string
870870 result = bundle .get_translation (
871- "greeting" , variables = {"name" : ["not" , "a" , "string" ]}, errors = errors
871+ "greeting" ,
872+ variables = {"name" : ["not" , "a" , "string" ]}, # type: ignore[dict-item]
873+ errors = errors ,
872874 )
873875
874876 # Result should use fallback (the variable key itself)
@@ -887,7 +889,7 @@ def test_get_translation_errors_invalid_variable_type():
887889def test_get_translation_errors_multiple_missing_variables ():
888890 """Test that multiple missing variables are all reported."""
889891 bundle = fluent .Bundle ("en" , [data_dir / "variables.ftl" ])
890- errors = []
892+ errors : list [ fluent . FormatError ] = []
891893
892894 # user-info needs both $username and $count
893895 result = bundle .get_translation ("user-info" , errors = errors )
@@ -906,7 +908,7 @@ def test_get_translation_errors_multiple_missing_variables():
906908def test_get_translation_errors_partial_variables ():
907909 """Test errors when only some variables are provided."""
908910 bundle = fluent .Bundle ("en" , [data_dir / "variables.ftl" ])
909- errors = []
911+ errors : list [ fluent . FormatError ] = []
910912
911913 # Provide only username, not count
912914 result = bundle .get_translation ("user-info" , variables = {"username" : "Alice" }, errors = errors )
@@ -932,7 +934,7 @@ def test_get_translation_errors_none_parameter():
932934def test_get_translation_errors_with_attributes ():
933935 """Test error collection with message attributes."""
934936 bundle = fluent .Bundle ("en" , [data_dir / "variables.ftl" ])
935- errors = []
937+ errors : list [ fluent . FormatError ] = []
936938
937939 # email-template.subject needs $recipient
938940 result = bundle .get_translation ("email-template.subject" , errors = errors )
0 commit comments