Skip to content

Commit

Permalink
Formatting (isort . && black .)
Browse files Browse the repository at this point in the history
  • Loading branch information
BelKed committed Jul 14, 2024
1 parent 8a6623f commit 9bfb6cd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
14 changes: 9 additions & 5 deletions edupage_api/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@

from requests import Response

from edupage_api.exceptions import (BadCredentialsException, CaptchaException,
MissingDataException, RequestError,
SecondFactorFailedException)
from edupage_api.exceptions import (
BadCredentialsException,
CaptchaException,
MissingDataException,
RequestError,
SecondFactorFailedException,
)
from edupage_api.module import EdupageModule, Module


Expand Down Expand Up @@ -181,7 +185,7 @@ def login(

if "bad=1" in response.url:
raise BadCredentialsException()

data = response.content.decode()

if subdomain == "login1":
Expand All @@ -198,7 +202,7 @@ def login(
request_url = (
f"https://{self.edupage.subdomain}.edupage.org/login/twofactor?sn=1"
)

two_factor_response = self.edupage.session.get(request_url)

data = two_factor_response.content.decode()
Expand Down
9 changes: 6 additions & 3 deletions edupage_api/lunches.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
from datetime import datetime
from typing import List, Optional

from edupage_api.exceptions import (FailedToChangeLunchError,
FailedToRateException, InvalidLunchData,
NotLoggedInException)
from edupage_api.exceptions import (
FailedToChangeLunchError,
FailedToRateException,
InvalidLunchData,
NotLoggedInException,
)
from edupage_api.module import EdupageModule, Module, ModuleHelper


Expand Down
9 changes: 6 additions & 3 deletions edupage_api/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

import requests

from edupage_api.exceptions import (MissingDataException,
NotAnOnlineLessonError,
NotLoggedInException, NotParentException)
from edupage_api.exceptions import (
MissingDataException,
NotAnOnlineLessonError,
NotLoggedInException,
NotParentException,
)


class EdupageModule:
Expand Down
3 changes: 1 addition & 2 deletions edupage_api/substitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from enum import Enum
from typing import Optional, Union

from edupage_api.exceptions import (ExpiredSessionException,
InvalidTeacherException)
from edupage_api.exceptions import ExpiredSessionException, InvalidTeacherException
from edupage_api.module import Module, ModuleHelper
from edupage_api.people import EduTeacher, People

Expand Down
3 changes: 1 addition & 2 deletions examples/2fa.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import time

from edupage_api import Edupage
from edupage_api.exceptions import (BadCredentialsException,
SecondFactorFailedException)
from edupage_api.exceptions import BadCredentialsException, SecondFactorFailedException

edupage = Edupage()

Expand Down
1 change: 0 additions & 1 deletion examples/all_teachers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from edupage_api import Edupage
from edupage_api.people import EduTeacher

edupage = Edupage()
edupage.login_auto("Username (or e-mail)", "Password")
Expand Down

0 comments on commit 9bfb6cd

Please sign in to comment.