Skip to content

Commit 5f47408

Browse files
authored
Merge pull request #173 from maxmind/greg/eng-1824
Improve docs and dev dep management
2 parents 4096e5d + 71b8052 commit 5f47408

File tree

13 files changed

+2023
-1141
lines changed

13 files changed

+2023
-1141
lines changed

docs/index.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,40 @@
33

44
.. include:: ../README.rst
55

6-
=======
7-
Modules
8-
=======
6+
==================
7+
Web Service Client
8+
==================
99

1010
.. automodule:: minfraud
1111
:members:
12+
:inherited-members:
13+
:show-inheritance:
1214
:no-undoc-members:
1315

1416
.. automodule:: minfraud.webservice
1517
:members:
18+
:inherited-members:
19+
:show-inheritance:
1620
:no-undoc-members:
1721

22+
===============
23+
Response Models
24+
===============
25+
1826
.. automodule:: minfraud.models
1927
:members:
28+
:inherited-members:
29+
:show-inheritance:
2030
:no-undoc-members:
2131

32+
======
33+
Errors
34+
======
35+
2236
.. automodule:: minfraud.errors
2337
:members:
38+
:inherited-members:
39+
:show-inheritance:
2440
:no-undoc-members:
2541

2642
==================

minfraud/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
"""
2-
minfraud
3-
~~~~~~~~
4-
5-
A client API to MaxMind's minFraud Score and Insights web services.
6-
"""
1+
"""minFraud client module."""
72

83
# flake8: noqa: F401
94
from .errors import (

minfraud/errors.py

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
"""
2-
minfraud.errors
3-
~~~~~~~~~~~~~~~
4-
5-
This module contains errors that are raised by this package.
6-
7-
"""
1+
"""Typed errors thrown by this library."""
82

93
from typing import Optional
104

@@ -26,30 +20,16 @@ class HTTPError(MinFraudError):
2620
2721
This class represents an HTTP transport error. It extends
2822
:py:exc:`MinFraudError` and adds attributes of its own.
29-
30-
.. attribute:: http_status:
31-
32-
The HTTP status code returned
33-
34-
:type: int
35-
36-
.. attribute:: uri:
37-
38-
The URI queried
39-
40-
:type: str
41-
42-
.. attribute:: decoded_content:
43-
44-
The decoded response content
45-
46-
:type: str
47-
4823
"""
4924

5025
http_status: Optional[int]
26+
"""The HTTP status code returned"""
27+
5128
uri: Optional[str]
29+
"""The URI queried"""
30+
5231
decoded_content: Optional[str]
32+
"""The decoded response content"""
5333

5434
def __init__(
5535
self,
@@ -58,6 +38,7 @@ def __init__(
5838
uri: Optional[str] = None,
5939
decoded_content: Optional[str] = None,
6040
) -> None:
41+
"""Initialize an HTTPError instance."""
6142
super().__init__(message)
6243
self.http_status = http_status
6344
self.uri = uri

0 commit comments

Comments
 (0)