Skip to content

Commit

Permalink
Refactor with linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeusina committed Dec 11, 2023
1 parent d6405a2 commit 0704193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions petersbugredu_wrap/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def login(self, login: str, password: str) -> None:
self.logger.debug(
"Request was successfully sent, status code: %code%".replace("%code%", str(response.status_code)))
if response.status_code == 200:
json_response: dict = json.loads(response.text)
json_response: dict = response.json()
token = json_response.get("data", None).get("token", None)
if token:
self._token = token
Expand Down Expand Up @@ -81,7 +81,7 @@ def get_child_list(self) -> list[Child]:
"Response with child list return %code% - status code".replace("%code%", str(response.status_code)))
if response.status_code != 200:
return []
response_json: dict = json.loads(response.text)
response_json: dict = response.json()
for child in response_json["data"]["items"]:
firstname = child.get("firstname", "")
surname = child.get("surname", "")
Expand Down
6 changes: 3 additions & 3 deletions petersbugredu_wrap/types/mark_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


class MarkEntry:
def __init__(self, id: int, education_id: int, lesson_id: int, subject_id: int, subject_name: str, date: datetime.datetime,
estimate_value_code: str, estimate_value_name: str, estimate_type_code: str, estimate_type_name: str,
estimate_comment: str):
def __init__(self, id: int, education_id: int, lesson_id: int, subject_id: int,
subject_name: str, date: datetime.datetime,estimate_value_code: str, estimate_value_name: str,
estimate_type_code: str, estimate_type_name: str, estimate_comment: str):
"""
Class represents mark entry in API
:param id:
Expand Down

0 comments on commit 0704193

Please sign in to comment.