diff --git a/ppgee/__init__.py b/ppgee/__init__.py index 0c75421..e0f2d46 100644 --- a/ppgee/__init__.py +++ b/ppgee/__init__.py @@ -1,3 +1,7 @@ -__version__ = "0.1.2" +__version__ = "0.1.3" from .client import PPGEE + +__all__ = [ + "PPGEE", +] diff --git a/ppgee/__main__.py b/ppgee/__main__.py index e70776a..e77bf5d 100644 --- a/ppgee/__main__.py +++ b/ppgee/__main__.py @@ -34,7 +34,10 @@ async def cli(): def main(): - asyncio.run(cli()) + try: + asyncio.run(cli()) + except KeyboardInterrupt: + print("Keyboard Interrupt. Exiting.") if __name__ == "__main__": diff --git a/ppgee/client.py b/ppgee/client.py index aa87163..82de59e 100644 --- a/ppgee/client.py +++ b/ppgee/client.py @@ -39,7 +39,7 @@ class PPGEE: await self.login() return self - async def __aexit__(self, exc_type, exc, tb) -> None: + async def __aexit__(self, *_) -> None: if self.is_logged: await self.logoff() await self.close() @@ -48,7 +48,7 @@ class PPGEE: logger.info("Logging in...") if self.user and self.password: resp = await self.http.login(self.user, self.password) - if "aindex" not in resp: # authentication failed + if "aindex" not in resp: # authentication failed await self.close() raise errors.InvalidCredentialsException() self.is_logged = True diff --git a/ppgee/pages/__init__.py b/ppgee/pages/__init__.py index ce0cade..eed88fb 100644 --- a/ppgee/pages/__init__.py +++ b/ppgee/pages/__init__.py @@ -1 +1,5 @@ from .frequency import FrequencyPage + +__all__ = [ + "FrequencyPage", +] diff --git a/pyproject.toml b/pyproject.toml index 404788d..6f68856 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ppgee" -version = "0.1.2" +version = "0.1.3" description = "" authors = ["tiagovla "] diff --git a/tests/test_ppgee.py b/tests/test_ppgee.py index ee8fb4e..bd5359d 100644 --- a/tests/test_ppgee.py +++ b/tests/test_ppgee.py @@ -2,4 +2,4 @@ from ppgee import __version__ def test_version(): - assert __version__ == "0.1.2" + assert __version__ == "0.1.3"