@@ -74,12 +74,12 @@ def test_invalid_arguments() -> None:
74
74
(['abc' , 'DEF' , 'geh$' ], 2 ),
75
75
([111 , 'DEF' , 'geh$' ], 2 ),
76
76
]:
77
- with pytest .raises (ValueError , match = re .escape (str (invalid_groups [bad_group_index ]))): # type: ignore
78
- ProxyConfiguration (groups = invalid_groups ) # type: ignore
77
+ with pytest .raises (ValueError , match = re .escape (str (invalid_groups [bad_group_index ]))): # type: ignore[index]
78
+ ProxyConfiguration (groups = invalid_groups ) # type: ignore[arg-type]
79
79
80
80
for invalid_country_code in ['CZE' , 'aa' , 'DDDD' , 1111 ]:
81
81
with pytest .raises (ValueError , match = re .escape (str (invalid_country_code ))):
82
- ProxyConfiguration (country_code = invalid_country_code ) # type: ignore
82
+ ProxyConfiguration (country_code = invalid_country_code ) # type: ignore[arg-type]
83
83
84
84
with pytest .raises (ValueError , match = 'Exactly one of .* must be specified' ):
85
85
ProxyConfiguration (
@@ -402,7 +402,7 @@ async def test_initialize_with_valid_configuration(
402
402
assert proxy_configuration ._password == DUMMY_PASSWORD
403
403
assert proxy_configuration .is_man_in_the_middle is True
404
404
405
- assert len (patched_apify_client .calls ['user' ]['get' ]) == 1 # type: ignore
405
+ assert len (patched_apify_client .calls ['user' ]['get' ]) == 1 # type: ignore[attr-defined]
406
406
assert len (route .calls ) == 1
407
407
408
408
@@ -526,7 +526,7 @@ async def test_initialize_with_non_apify_proxy(
526
526
527
527
await proxy_configuration .initialize ()
528
528
529
- assert len (patched_apify_client .calls ['user' ]['get' ]) == 0 # type: ignore
529
+ assert len (patched_apify_client .calls ['user' ]['get' ]) == 0 # type: ignore[attr-defined]
530
530
assert len (route .calls ) == 0
531
531
532
532
0 commit comments