From 79eec19afc711b8326ebfa5ac6aa81ad1046bd5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=AB=E4=B9=90=E7=9A=84=E8=80=81=E9=BC=A0=E5=AE=9D?= =?UTF-8?q?=E5=AE=9D?= <42690037+LaoshuBaby@users.noreply.github.com> Date: Thu, 29 Feb 2024 01:59:49 +0800 Subject: [PATCH] lint: don't import too much from root We'd better import NWR from yuheng.type --- src/yuheng/plugin/driver_db_postgresql/__main__.py | 3 ++- tests/cases/plugin_folium.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/yuheng/plugin/driver_db_postgresql/__main__.py b/src/yuheng/plugin/driver_db_postgresql/__main__.py index b30a673..b575492 100644 --- a/src/yuheng/plugin/driver_db_postgresql/__main__.py +++ b/src/yuheng/plugin/driver_db_postgresql/__main__.py @@ -11,7 +11,8 @@ current_dir = os.path.dirname(os.path.realpath(__file__)) src_dir = os.path.join(current_dir, "..", "..", "..") sys.path.append(src_dir) -from yuheng import Node, Waifu, Way +from yuheng import Waifu +from yuheng.type import Node, Way PROJ_TRANSFORMER = pyproj.Transformer.from_crs("epsg:3857", "epsg:4326") diff --git a/tests/cases/plugin_folium.py b/tests/cases/plugin_folium.py index 52f78d2..70e9cec 100644 --- a/tests/cases/plugin_folium.py +++ b/tests/cases/plugin_folium.py @@ -6,7 +6,8 @@ src_dir = os.path.join(current_dir, "../../src") sys.path.append(src_dir) -from yuheng import Member, Node, Relation, Waifu, Way +from yuheng import Waifu +from yuheng.type import Member, Node, Relation, Way from yuheng.plugin.folium.__main__ import display