Rename package

This commit is contained in:
Changhua 2022-10-19 18:46:27 +08:00
parent 708725ee9e
commit e8e687ec92
3 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import logging
import signal
from time import sleep
from wcf.client import Wcf
from wcferry import Wcf
def main():

View File

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from .client import Wcf
from .client import __version__

View File

@ -9,7 +9,7 @@ import re
import sys
from threading import Thread
from time import sleep
from typing import Any, List, Callable, Optional
from typing import List, Callable, Optional
import grpc
@ -18,6 +18,8 @@ sys.path.insert(0, WCF_ROOT)
import wcf_pb2 # noqa
import wcf_pb2_grpc # noqa
__version__ = "v3.7.0.30-11"
class Wcf():
"""WeChatFerry, a tool to play WeChat."""
@ -182,7 +184,7 @@ class Wcf():
tables = []
rsp = self._stub.RpcGetDbTables(wcf_pb2.String(str=db))
for tbl in rsp.tables:
tables.append({"name": tbl.name, "sql": tbl.sql.replace("\t", "")})
tables.append({"name": tbl.name, "sql": tbl.sql})
return tables
def query_sql(self, db: str, sql: str) -> List[dict]: