1111import ipaddress
1212from abc import ABCMeta
1313from ipaddress import IPv4Address , IPv6Address
14- from typing import TYPE_CHECKING
14+ from typing import TYPE_CHECKING , Any
1515
1616import geoip2 .records
1717from geoip2 ._internal import Model
@@ -55,15 +55,15 @@ def __init__(
5555 self ,
5656 locales : Sequence [str ] | None ,
5757 * ,
58- continent : dict | None = None ,
59- country : dict | None = None ,
58+ continent : dict [ str , Any ] | None = None ,
59+ country : dict [ str , Any ] | None = None ,
6060 ip_address : IPAddress | None = None ,
61- maxmind : dict | None = None ,
61+ maxmind : dict [ str , Any ] | None = None ,
6262 prefix_len : int | None = None ,
63- registered_country : dict | None = None ,
64- represented_country : dict | None = None ,
65- traits : dict | None = None ,
66- ** _ ,
63+ registered_country : dict [ str , Any ] | None = None ,
64+ represented_country : dict [ str , Any ] | None = None ,
65+ traits : dict [ str , Any ] | None = None ,
66+ ** _ : Any ,
6767 ) -> None :
6868 self ._locales = locales
6969 self .continent = geoip2 .records .Continent (locales , ** (continent or {}))
@@ -115,19 +115,19 @@ def __init__(
115115 self ,
116116 locales : Sequence [str ] | None ,
117117 * ,
118- city : dict | None = None ,
119- continent : dict | None = None ,
120- country : dict | None = None ,
121- location : dict | None = None ,
118+ city : dict [ str , Any ] | None = None ,
119+ continent : dict [ str , Any ] | None = None ,
120+ country : dict [ str , Any ] | None = None ,
121+ location : dict [ str , Any ] | None = None ,
122122 ip_address : IPAddress | None = None ,
123- maxmind : dict | None = None ,
124- postal : dict | None = None ,
123+ maxmind : dict [ str , Any ] | None = None ,
124+ postal : dict [ str , Any ] | None = None ,
125125 prefix_len : int | None = None ,
126- registered_country : dict | None = None ,
127- represented_country : dict | None = None ,
128- subdivisions : list [dict ] | None = None ,
129- traits : dict | None = None ,
130- ** _ ,
126+ registered_country : dict [ str , Any ] | None = None ,
127+ represented_country : dict [ str , Any ] | None = None ,
128+ subdivisions : list [dict [ str , Any ] ] | None = None ,
129+ traits : dict [ str , Any ] | None = None ,
130+ ** _ : Any ,
131131 ) -> None :
132132 super ().__init__ (
133133 locales ,
@@ -260,7 +260,7 @@ def __init__(
260260 is_tor_exit_node : bool = False ,
261261 network : str | None = None ,
262262 prefix_len : int | None = None ,
263- ** _ ,
263+ ** _ : Any ,
264264 ) -> None :
265265 super ().__init__ (ip_address , network , prefix_len )
266266 self .is_anonymous = is_anonymous
@@ -304,7 +304,7 @@ def __init__(
304304 network_last_seen : str | None = None ,
305305 prefix_len : int | None = None ,
306306 provider_name : str | None = None ,
307- ** _ ,
307+ ** _ : Any ,
308308 ) -> None :
309309 super ().__init__ (
310310 is_anonymous = is_anonymous ,
@@ -342,7 +342,7 @@ def __init__(
342342 autonomous_system_organization : str | None = None ,
343343 network : str | None = None ,
344344 prefix_len : int | None = None ,
345- ** _ ,
345+ ** _ : Any ,
346346 ) -> None :
347347 super ().__init__ (ip_address , network , prefix_len )
348348 self .autonomous_system_number = autonomous_system_number
@@ -371,7 +371,7 @@ def __init__(
371371 connection_type : str | None = None ,
372372 network : str | None = None ,
373373 prefix_len : int | None = None ,
374- ** _ ,
374+ ** _ : Any ,
375375 ) -> None :
376376 super ().__init__ (ip_address , network , prefix_len )
377377 self .connection_type = connection_type
@@ -390,7 +390,7 @@ def __init__(
390390 domain : str | None = None ,
391391 network : str | None = None ,
392392 prefix_len : int | None = None ,
393- ** _ ,
393+ ** _ : Any ,
394394 ) -> None :
395395 super ().__init__ (ip_address , network , prefix_len )
396396 self .domain = domain
@@ -429,7 +429,7 @@ def __init__(
429429 organization : str | None = None ,
430430 network : str | None = None ,
431431 prefix_len : int | None = None ,
432- ** _ ,
432+ ** _ : Any ,
433433 ) -> None :
434434 super ().__init__ (
435435 autonomous_system_number = autonomous_system_number ,
0 commit comments