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__(
5555self ,
5656locales :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 ,
6060ip_address :IPAddress | None = None ,
61- maxmind :dict | None = None ,
61+ maxmind :dict [ str , Any ] | None = None ,
6262prefix_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 :
6868self ._locales = locales
6969self .continent = geoip2 .records .Continent (locales ,** (continent or {}))
@@ -115,19 +115,19 @@ def __init__(
115115self ,
116116locales :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 ,
122122ip_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 ,
125125prefix_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 :
132132super ().__init__ (
133133locales ,
@@ -260,7 +260,7 @@ def __init__(
260260is_tor_exit_node :bool = False ,
261261network :str | None = None ,
262262prefix_len :int | None = None ,
263- ** _ ,
263+ ** _ : Any ,
264264 )-> None :
265265super ().__init__ (ip_address ,network ,prefix_len )
266266self .is_anonymous = is_anonymous
@@ -304,7 +304,7 @@ def __init__(
304304network_last_seen :str | None = None ,
305305prefix_len :int | None = None ,
306306provider_name :str | None = None ,
307- ** _ ,
307+ ** _ : Any ,
308308 )-> None :
309309super ().__init__ (
310310is_anonymous = is_anonymous ,
@@ -342,7 +342,7 @@ def __init__(
342342autonomous_system_organization :str | None = None ,
343343network :str | None = None ,
344344prefix_len :int | None = None ,
345- ** _ ,
345+ ** _ : Any ,
346346 )-> None :
347347super ().__init__ (ip_address ,network ,prefix_len )
348348self .autonomous_system_number = autonomous_system_number
@@ -371,7 +371,7 @@ def __init__(
371371connection_type :str | None = None ,
372372network :str | None = None ,
373373prefix_len :int | None = None ,
374- ** _ ,
374+ ** _ : Any ,
375375 )-> None :
376376super ().__init__ (ip_address ,network ,prefix_len )
377377self .connection_type = connection_type
@@ -390,7 +390,7 @@ def __init__(
390390domain :str | None = None ,
391391network :str | None = None ,
392392prefix_len :int | None = None ,
393- ** _ ,
393+ ** _ : Any ,
394394 )-> None :
395395super ().__init__ (ip_address ,network ,prefix_len )
396396self .domain = domain
@@ -429,7 +429,7 @@ def __init__(
429429organization :str | None = None ,
430430network :str | None = None ,
431431prefix_len :int | None = None ,
432- ** _ ,
432+ ** _ : Any ,
433433 )-> None :
434434super ().__init__ (
435435autonomous_system_number = autonomous_system_number ,