Skip to content

Commit

Permalink
fix: solve Problem when importing CasdoorSDK or AsyncCasdoorSDK (#68)
Browse files Browse the repository at this point in the history
* feat: add all missing APIs

* feat: add all missing APIs

* feat: add all missing APIs

* fix: refactor file structures

* fix: solve Problem when importing CasdoorSDK or AsyncCasdoorSDK

* fix: solve Problem when importing CasdoorSDK or AsyncCasdoorSDK
  • Loading branch information
palp1tate authored Sep 7, 2023
1 parent f1a9b9b commit f60c63b
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/casdoor/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Adapter:
Expand Down
3 changes: 1 addition & 2 deletions src/casdoor/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import requests

from src.casdoor import CasdoorSDK

from .main import CasdoorSDK
from .organization import Organization, ThemeData
from .provider import Provider

Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Cert:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Enforcer:
Expand Down
3 changes: 1 addition & 2 deletions src/casdoor/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import requests

from src.casdoor import CasdoorSDK

from .main import CasdoorSDK
from .user import User


Expand Down
3 changes: 1 addition & 2 deletions src/casdoor/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import requests

from src.casdoor import CasdoorSDK

from .main import CasdoorSDK
from .user import User


Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class AccountItem:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Payment:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/permisssion.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Permission:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Plan:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Pricing:
Expand Down
3 changes: 1 addition & 2 deletions src/casdoor/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import requests

from src.casdoor import CasdoorSDK

from .main import CasdoorSDK
from .provider import Provider


Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Provider:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Resource:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Role:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Session:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Subscription:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class TableColumn:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class Token:
Expand Down
2 changes: 1 addition & 1 deletion src/casdoor/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import requests

from src.casdoor import CasdoorSDK
from .main import CasdoorSDK


class User:
Expand Down
3 changes: 1 addition & 2 deletions src/casdoor/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import requests

from src.casdoor import CasdoorSDK

from .main import CasdoorSDK
from .syncer import TableColumn


Expand Down
3 changes: 2 additions & 1 deletion src/tests/test_async_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

from unittest import IsolatedAsyncioTestCase, mock

from src.casdoor.async_main import AsyncCasdoorSDK, User
from src.casdoor.async_main import AsyncCasdoorSDK
from src.casdoor.user import User


class TestOAuth(IsolatedAsyncioTestCase):
Expand Down
3 changes: 2 additions & 1 deletion src/tests/test_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

from requests import Response

from src.casdoor.main import CasdoorSDK, User
from src.casdoor.main import CasdoorSDK
from src.casdoor.user import User


class TestOAuth(TestCase):
Expand Down

0 comments on commit f60c63b

Please sign in to comment.