|
27 | 27 |
|
28 | 28 | import gitlab.config
|
29 | 29 | from gitlab.const import * # noqa
|
30 |
| -from gitlab.exceptions import (on_http_error, GitlabVerifyError, |
31 |
| - GitlabMarkdownError, GitlabLicenseError, RedirectError, |
32 |
| - GitlabHttpError, GitlabAuthenticationError, |
33 |
| - GitlabParsingError, GitlabSearchError) |
| 30 | +from gitlab.exceptions import ( |
| 31 | + on_http_error, |
| 32 | + GitlabVerifyError, |
| 33 | + GitlabMarkdownError, |
| 34 | + GitlabLicenseError, |
| 35 | + RedirectError, |
| 36 | + GitlabHttpError, |
| 37 | + GitlabAuthenticationError, |
| 38 | + GitlabParsingError, |
| 39 | + GitlabSearchError, |
| 40 | +) |
34 | 41 | from gitlab import utils # noqa
|
35 | 42 |
|
36 | 43 | __title__ = "python-gitlab"
|
@@ -572,7 +579,9 @@ async def http_request(
|
572 | 579 | response_body=result.content,
|
573 | 580 | )
|
574 | 581 |
|
575 |
| - async def http_get(self, path, query_data=None, streamed=False, raw=False, **kwargs): |
| 582 | + async def http_get( |
| 583 | + self, path, query_data=None, streamed=False, raw=False, **kwargs |
| 584 | + ): |
576 | 585 | """Make a GET request to the Gitlab server.
|
577 | 586 |
|
578 | 587 | Args:
|
@@ -650,8 +659,9 @@ async def http_list(self, path, query_data=None, as_list=None, **kwargs):
|
650 | 659 | # No pagination, generator requested
|
651 | 660 | return GitlabList(self, url, query_data, **kwargs)
|
652 | 661 |
|
653 |
| - async def http_post(self, path, query_data=None, |
654 |
| - post_data=None, files=None, **kwargs): |
| 662 | + async def http_post( |
| 663 | + self, path, query_data=None, post_data=None, files=None, **kwargs |
| 664 | + ): |
655 | 665 | """Make a POST request to the Gitlab server.
|
656 | 666 |
|
657 | 667 | Args:
|
@@ -689,8 +699,9 @@ async def http_post(self, path, query_data=None,
|
689 | 699 | raise GitlabParsingError(error_message="Failed to parse the server message")
|
690 | 700 | return result
|
691 | 701 |
|
692 |
| - async def http_put(self, path, query_data=None, |
693 |
| - post_data=None, files=None, **kwargs): |
| 702 | + async def http_put( |
| 703 | + self, path, query_data=None, post_data=None, files=None, **kwargs |
| 704 | + ): |
694 | 705 | """Make a PUT request to the Gitlab server.
|
695 | 706 |
|
696 | 707 | Args:
|
@@ -775,10 +786,9 @@ async def __init__(self, gl, url, query_data, get_next=True, **kwargs):
|
775 | 786 |
|
776 | 787 | async def _query(self, url, query_data=None, **kwargs):
|
777 | 788 | query_data = query_data or {}
|
778 |
| - result = await self._gl.http_request("get", |
779 |
| - url, |
780 |
| - query_data=query_data, |
781 |
| - **kwargs) |
| 789 | + result = await self._gl.http_request( |
| 790 | + "get", url, query_data=query_data, **kwargs |
| 791 | + ) |
782 | 792 | try:
|
783 | 793 | self._next_url = result.links["next"]["url"]
|
784 | 794 | except KeyError:
|
|
0 commit comments