Skip to content

Commit

Permalink
Make everything but method and url keyword only parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jocke-l committed Oct 5, 2020
1 parent 3e14442 commit f368452
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions respx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def pop(alias, default=...):
def add(
method: Union[str, Callable],
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -70,6 +71,7 @@ def add(

def get(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -91,6 +93,7 @@ def get(

def post(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -112,6 +115,7 @@ def post(

def put(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -133,6 +137,7 @@ def put(

def patch(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -154,6 +159,7 @@ def patch(

def delete(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -175,6 +181,7 @@ def delete(

def head(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -196,6 +203,7 @@ def head(

def options(
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand Down
8 changes: 8 additions & 0 deletions respx/transports.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def add(
self,
method: Union[str, Callable, RequestPattern],
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand Down Expand Up @@ -125,6 +126,7 @@ def add(
def get(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -146,6 +148,7 @@ def get(
def post(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -167,6 +170,7 @@ def post(
def put(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -188,6 +192,7 @@ def put(
def patch(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -209,6 +214,7 @@ def patch(
def delete(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -230,6 +236,7 @@ def delete(
def head(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand All @@ -251,6 +258,7 @@ def head(
def options(
self,
url: Optional[Union[str, Pattern]] = None,
*,
status_code: Optional[int] = None,
content: Optional[ContentDataTypes] = None,
content_type: Optional[str] = None,
Expand Down

0 comments on commit f368452

Please sign in to comment.