|
16 | 16 | import struct |
17 | 17 | from ipaddress import IPv4Address, IPv6Address |
18 | 18 | from os import PathLike |
19 | | -from typing import Any, AnyStr, IO, Optional, Tuple, Union |
| 19 | +from typing import Any, AnyStr, Dict, IO, List, Optional, Tuple, Union |
20 | 20 |
|
21 | 21 | from maxminddb.const import MODE_AUTO, MODE_MMAP, MODE_FILE, MODE_MEMORY, MODE_FD |
22 | 22 | from maxminddb.decoder import Decoder |
@@ -270,67 +270,55 @@ def __enter__(self) -> "Reader": |
270 | 270 |
|
271 | 271 |
|
272 | 272 | class Metadata: |
273 | | - """Metadata for the MaxMind DB reader |
| 273 | + """Metadata for the MaxMind DB reader""" |
274 | 274 |
|
| 275 | + binary_format_major_version: int |
| 276 | + """ |
| 277 | + The major version number of the binary format used when creating the |
| 278 | + database. |
| 279 | + """ |
275 | 280 |
|
276 | | - .. attribute:: binary_format_major_version |
277 | | -
|
278 | | - The major version number of the binary format used when creating the |
279 | | - database. |
280 | | -
|
281 | | - :type: int |
282 | | -
|
283 | | - .. attribute:: binary_format_minor_version |
284 | | -
|
285 | | - The minor version number of the binary format used when creating the |
286 | | - database. |
287 | | -
|
288 | | - :type: int |
289 | | -
|
290 | | - .. attribute:: build_epoch |
291 | | -
|
292 | | - The Unix epoch for the build time of the database. |
293 | | -
|
294 | | - :type: int |
295 | | -
|
296 | | - .. attribute:: database_type |
297 | | -
|
298 | | - A string identifying the database type, e.g., "GeoIP2-City". |
299 | | -
|
300 | | - :type: str |
301 | | -
|
302 | | - .. attribute:: description |
303 | | -
|
304 | | - A map from locales to text descriptions of the database. |
305 | | -
|
306 | | - :type: dict(str, str) |
307 | | -
|
308 | | - .. attribute:: ip_version |
309 | | -
|
310 | | - The IP version of the data in a database. A value of "4" means the |
311 | | - database only supports IPv4. A database with a value of "6" may support |
312 | | - both IPv4 and IPv6 lookups. |
313 | | -
|
314 | | - :type: int |
315 | | -
|
316 | | - .. attribute:: languages |
317 | | -
|
318 | | - A list of locale codes supported by the databse. |
319 | | -
|
320 | | - :type: list(str) |
| 281 | + binary_format_minor_version: int |
| 282 | + """ |
| 283 | + The minor version number of the binary format used when creating the |
| 284 | + database. |
| 285 | + """ |
321 | 286 |
|
322 | | - .. attribute:: node_count |
| 287 | + build_epoch: int |
| 288 | + """ |
| 289 | + The Unix epoch for the build time of the database. |
| 290 | + """ |
323 | 291 |
|
324 | | - The number of nodes in the database. |
| 292 | + database_type: str |
| 293 | + """ |
| 294 | + A string identifying the database type, e.g., "GeoIP2-City". |
| 295 | + """ |
325 | 296 |
|
326 | | - :type: int |
| 297 | + description: Dict[str, str] |
| 298 | + """ |
| 299 | + A map from locales to text descriptions of the database. |
| 300 | + """ |
327 | 301 |
|
328 | | - .. attribute:: record_size |
| 302 | + ip_version: int |
| 303 | + """ |
| 304 | + The IP version of the data in a database. A value of "4" means the |
| 305 | + database only supports IPv4. A database with a value of "6" may support |
| 306 | + both IPv4 and IPv6 lookups. |
| 307 | + """ |
329 | 308 |
|
330 | | - The bit size of a record in the search tree. |
| 309 | + languages: List[str] |
| 310 | + """ |
| 311 | + A list of locale codes supported by the databse. |
| 312 | + """ |
331 | 313 |
|
332 | | - :type: int |
| 314 | + node_count: int |
| 315 | + """ |
| 316 | + The number of nodes in the database. |
| 317 | + """ |
333 | 318 |
|
| 319 | + record_size: int |
| 320 | + """ |
| 321 | + The bit size of a record in the search tree. |
334 | 322 | """ |
335 | 323 |
|
336 | 324 | # pylint: disable=too-many-instance-attributes |
|
0 commit comments