Skip to content

Commit

Permalink
Rename errors module
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanhed committed Dec 25, 2023
1 parent 1a1a59b commit 764a173
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/mijnbib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# So user can do e.g.
# from mijnbib import MijnBibliotheek, Loan

from .mijnbibliotheek import MijnBibliotheek
from .models import Account, Loan, Reservation
from .plugin_errors import (
from .errors import (
AuthenticationError,
CanNotConnectError,
ExtendLoanError,
Expand All @@ -13,3 +11,5 @@
PluginError,
TemporarySiteError,
)
from .mijnbibliotheek import MijnBibliotheek
from .models import Account, Loan, Reservation
File renamed without changes.
16 changes: 8 additions & 8 deletions src/mijnbib/mijnbibliotheek.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@

import mechanize

from mijnbib.models import Account, Loan, Reservation
from mijnbib.parsers import (
AccountsListPageParser,
ExtendResponsePageParser,
LoansListPageParser,
ReservationsPageParser,
)
from mijnbib.plugin_errors import (
from mijnbib.errors import (
AuthenticationError,
CanNotConnectError,
ExtendLoanError,
Expand All @@ -31,6 +24,13 @@
ItemAccessError,
TemporarySiteError,
)
from mijnbib.models import Account, Loan, Reservation
from mijnbib.parsers import (
AccountsListPageParser,
ExtendResponsePageParser,
LoansListPageParser,
ReservationsPageParser,
)

_log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/mijnbib/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from bs4 import BeautifulSoup

from mijnbib.errors import TemporarySiteError
from mijnbib.models import Account, Loan, Reservation
from mijnbib.plugin_errors import TemporarySiteError

_log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mijnbib.plugin_errors import CanNotConnectError, IncompatibleSourceError
from mijnbib.errors import CanNotConnectError, IncompatibleSourceError


def test_incompatiblesourceerror():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mijnbib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_mijnbib_available_imports():
"IncompatibleSourceError",
"PluginError",
"TemporarySiteError",
"plugin_errors",
"errors",
"mijnbibliotheek",
"parsers",
"models",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mijnbibliotheek.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

from mijnbib import MijnBibliotheek
from mijnbib.plugin_errors import AuthenticationError
from mijnbib.errors import AuthenticationError


class FakeMechanizeBrowser:
Expand Down

0 comments on commit 764a173

Please sign in to comment.