Skip to content

Commit bc23aa4

Browse files
author
Andrey Dolgolev
committed
fix black formating
1 parent 7d015d1 commit bc23aa4

5 files changed

Lines changed: 39 additions & 12 deletions

File tree

bugout/app.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ def create_token(
147147
)
148148

149149
def create_token_restricted(
150-
self, token: Union[str, uuid.UUID], timeout: float = REQUESTS_TIMEOUT,
150+
self,
151+
token: Union[str, uuid.UUID],
152+
timeout: float = REQUESTS_TIMEOUT,
151153
) -> data.BugoutToken:
152154
self.user.timeout = timeout
153155
return self.user.create_token_restricted(token=token)
@@ -543,7 +545,9 @@ def create_entries_pack(
543545
entries=[data.BugoutJournalEntryRequest(**entry) for entry in entries]
544546
)
545547
return self.journal.create_entries_pack(
546-
token=token, journal_id=journal_id, entries=entries_obj,
548+
token=token,
549+
journal_id=journal_id,
550+
entries=entries_obj,
547551
)
548552

549553
def get_entry(
@@ -689,7 +693,9 @@ def search(
689693

690694
# Public
691695
def check_journal_public(
692-
self, journal_id: Union[str, uuid.UUID], timeout: float = REQUESTS_TIMEOUT,
696+
self,
697+
journal_id: Union[str, uuid.UUID],
698+
timeout: float = REQUESTS_TIMEOUT,
693699
) -> bool:
694700
self.journal.timeout = timeout
695701
return self.journal.check_journal_public(journal_id=journal_id)

bugout/exceptions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ class BugoutResponseException(Exception):
1919
"""
2020

2121
def __init__(
22-
self, message, status_code: int, detail: Optional[Any] = None,
22+
self,
23+
message,
24+
status_code: int,
25+
detail: Optional[Any] = None,
2326
) -> None:
2427
super().__init__(message)
2528
self.status_code = status_code

bugout/group.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def get_group(
4545
return BugoutGroup(**result)
4646

4747
def find_group(
48-
self, token: Union[str, uuid.UUID], group_id: Union[str, uuid.UUID],
48+
self,
49+
token: Union[str, uuid.UUID],
50+
group_id: Union[str, uuid.UUID],
4951
) -> BugoutGroup:
5052
find_group_path = f"groups/find"
5153
query_params = {"group_id": group_id}
@@ -212,7 +214,9 @@ def create_application(
212214
return BugoutApplication(**result)
213215

214216
def get_application(
215-
self, token: Union[str, uuid.UUID], application_id: Union[str, uuid.UUID],
217+
self,
218+
token: Union[str, uuid.UUID],
219+
application_id: Union[str, uuid.UUID],
216220
) -> BugoutApplication:
217221
applications_path = f"applications/{application_id}"
218222
headers = {
@@ -242,7 +246,9 @@ def list_applications(
242246
return BugoutApplications(**result)
243247

244248
def delete_application(
245-
self, token: Union[str, uuid.UUID], application_id: Union[str, uuid.UUID],
249+
self,
250+
token: Union[str, uuid.UUID],
251+
application_id: Union[str, uuid.UUID],
246252
) -> BugoutApplication:
247253
applications_path = f"applications/{application_id}"
248254
headers = {

bugout/journal.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ def delete_journal_scopes(
135135

136136
# Journal module
137137
def create_journal(
138-
self, token: Union[str, uuid.UUID], name: str, journal_type: JournalTypes,
138+
self,
139+
token: Union[str, uuid.UUID],
140+
name: str,
141+
journal_type: JournalTypes,
139142
) -> BugoutJournal:
140143
journal_path = "journals/"
141144
json = {"name": name, "journal_type": journal_type.value}
@@ -302,7 +305,10 @@ def update_entry_content(
302305
"Authorization": f"Bearer {token}",
303306
}
304307
result = self._call(
305-
method=Method.put, path=entry_id_content_path, headers=headers, json=json,
308+
method=Method.put,
309+
path=entry_id_content_path,
310+
headers=headers,
311+
json=json,
306312
)
307313
return BugoutJournalEntryContent(**result)
308314

bugout/resource.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ def create_resource(
4545
return BugoutResource(**result)
4646

4747
def get_resource(
48-
self, token: Union[str, uuid.UUID], resource_id: Union[str, uuid.UUID],
48+
self,
49+
token: Union[str, uuid.UUID],
50+
resource_id: Union[str, uuid.UUID],
4951
) -> BugoutResource:
5052
resources_path = f"resources/{resource_id}"
5153
headers = {
@@ -55,7 +57,9 @@ def get_resource(
5557
return BugoutResource(**result)
5658

5759
def list_resources(
58-
self, token: Union[str, uuid.UUID], params: Optional[Dict[str, Any]] = None,
60+
self,
61+
token: Union[str, uuid.UUID],
62+
params: Optional[Dict[str, Any]] = None,
5963
) -> BugoutResources:
6064
resources_path = "resources/"
6165
headers = {
@@ -85,7 +89,9 @@ def update_resource(
8589
return BugoutResource(**result)
8690

8791
def delete_resource(
88-
self, token: Union[str, uuid.UUID], resource_id: Union[str, uuid.UUID],
92+
self,
93+
token: Union[str, uuid.UUID],
94+
resource_id: Union[str, uuid.UUID],
8995
) -> BugoutResource:
9096
resources_path = f"resources/{resource_id}"
9197
headers = {

0 commit comments

Comments
 (0)