Skip to content

improved Importations #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,7 @@ dmypy.json
.pyre/

*.sh
!run_tests.sh
notes.md
guide.md
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pip install pythepeer
Instantiate ```Thepeer``` class like so:
```python
import thepeer
from thepeer.main import Thepeer
from thepeer import Thepeer

# create an instance of ThepeerInit class

Expand Down
1 change: 1 addition & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python -m unittest discover -s './tests' -p 'test_*.py'
File renamed without changes.
4 changes: 2 additions & 2 deletions thepeer/tests/thepeer_test.py → tests/test_thepeer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from thepeer import main # type: ignore
from thepeer import Thepeer # type: ignore

thepeer_test_suites = main.Thepeer("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")
thepeer_test_suites = Thepeer("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")


class ThePeerInitMethods(unittest.TestCase):
Expand Down
7 changes: 7 additions & 0 deletions thepeer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .main import Thepeer
from .utils import exceptions

__all__ = (
"Thepeer",
"exceptions"
)
7 changes: 2 additions & 5 deletions thepeer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import os
import sys

sys.path.append(os.path.dirname(os.path.abspath(__file__)))


import httpx # noqa: E402
from utils.constants import BASE_URL # noqa: E402
from utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402
from .utils.constants import BASE_URL # noqa: E402
from .utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402


class Thepeer:
Expand Down