Skip to content

Commit 43998a1

Browse files
committed
Do not support int as IP addresses
1 parent 6b83cd0 commit 43998a1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

maxminddb/reader.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ def metadata(self) -> "Metadata":
111111
"""Return the metadata associated with the MaxMind DB file"""
112112
return self._metadata
113113

114-
def get(
115-
self, ip_address: Union[str, IPv6Address, IPv4Address, int]
116-
) -> Optional[Record]:
114+
def get(self, ip_address: Union[str, IPv6Address, IPv4Address]) -> Optional[Record]:
117115
"""Return the record for the ip_address in the MaxMind DB
118116
119117
@@ -124,7 +122,7 @@ def get(
124122
return record
125123

126124
def get_with_prefix_len(
127-
self, ip_address: Union[str, IPv6Address, IPv4Address, int]
125+
self, ip_address: Union[str, IPv6Address, IPv4Address]
128126
) -> Tuple[Optional[Record], int]:
129127
"""Return a tuple with the record and the associated prefix length
130128

0 commit comments

Comments
 (0)