Skip to content

Commit

Permalink
import sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
Joxos committed Sep 17, 2023
1 parent ed7c68f commit 03889d3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions pyasync_server/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

sys.path.append('..')
from common.protocol import on_init, is_framed
from common.utils import *

from common.utils import show_status, compress, decompress, STATUS, handle_run_main, logger
from package import *
from config import *

Expand Down
6 changes: 0 additions & 6 deletions pyasync_server/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ class COMPRESSER(Enum):
LZMA = auto()


class SQLTYPE(Enum):
NONE=auto()
MYSQL = auto()
MARIADB = auto()


# configuration starts here
compresser = COMPRESSER.NONE
default_coding = 'utf-8'
Expand Down
2 changes: 2 additions & 0 deletions pyasync_server/server/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from common.utils import logger
from sys import exit
from config import *

# resolve SQL connection
if sql_type == SQLTYPE.MYSQL:
from pymysql import connect, Error
elif sql_type == SQLTYPE.MARIADB:
Expand Down
7 changes: 7 additions & 0 deletions pyasync_server/server/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
from common.config import *


class SQLTYPE(Enum):
NONE = auto()
MYSQL = auto()
MARIADB = auto()


crt_path = 'server.crt'
key_path = 'server.key'
server_address = ('127.0.0.1', 1145)
Expand Down
3 changes: 1 addition & 2 deletions pyasync_server/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

sys.path.append('..')
from common.protocol import on_init, is_framed
from common.utils import show_status, compress, decompress, STATUS, handle_run_main, logger
from package import unpack_and_process
from common.utils import show_status, compress, decompress, STATUS, handle_run_main
from config import *
from actions import *


# callback style server:
Expand Down

0 comments on commit 03889d3

Please sign in to comment.