From fbb2756d8312efede6c5e27f16c2e6615b6e51f0 Mon Sep 17 00:00:00 2001 From: Verdgil Date: Sun, 4 Dec 2022 15:22:13 +0300 Subject: [PATCH] feat: fix init imports (#31) --- CHANGELOG.md | 6 ++++++ setup.cfg | 2 +- src/casdoor/__init__.py | 9 ++------- src/tests/__init__.py | 6 +----- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac9349b..139fa48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ + # Change import + +* fix init imports + +## [1.2.2](https://github.com/casdoor/casdoor-python-sdk/compare/v1.2.1...v1.2.2) (2022-12-02) + # Semantic Versioning Changelog ## [1.2.1](https://github.com/casdoor/casdoor-python-sdk/compare/v1.2.0...v1.2.1) (2022-08-19) diff --git a/setup.cfg b/setup.cfg index c7cc591..8ab6b81 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = casdoor -version = 1.2.1 +version = 1.2.2 author = ffyuanda author_email = shaoxuan.yuan02@gmail.com url = https://github.com/casdoor/casdoor-python-sdk diff --git a/src/casdoor/__init__.py b/src/casdoor/__init__.py index c25b4d8..a8e567a 100644 --- a/src/casdoor/__init__.py +++ b/src/casdoor/__init__.py @@ -1,7 +1,2 @@ -try: - from main import * - from user import * - -except ModuleNotFoundError or ImportError: - from .main import * - from .user import * +from .main import CasdoorSDK +from .user import User diff --git a/src/tests/__init__.py b/src/tests/__init__.py index dfd61ef..385bc8a 100644 --- a/src/tests/__init__.py +++ b/src/tests/__init__.py @@ -1,5 +1 @@ -try: - from test_oauth import * - -except ModuleNotFoundError or ImportError: - from .test_oauth import * +from .test_oauth import TestOAuth