From e29e5784da09159015b557488a408d196eda1c47 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 4 Apr 2020 14:21:14 +0200 Subject: [PATCH] moved views to view/ --- lib/view/__init__.py | 0 lib/{wttr_line.py => view/line.py} | 4 ++-- lib/{spark.py => view/v2.py} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 lib/view/__init__.py rename lib/{wttr_line.py => view/line.py} (99%) rename lib/{spark.py => view/v2.py} (99%) diff --git a/lib/view/__init__.py b/lib/view/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lib/wttr_line.py b/lib/view/line.py similarity index 99% rename from lib/wttr_line.py rename to lib/view/line.py index 6029f4a..1306051 100644 --- a/lib/wttr_line.py +++ b/lib/view/line.py @@ -23,7 +23,7 @@ except ImportError: pass from constants import WWO_CODE, WEATHER_SYMBOL, WIND_DIRECTION from weather_data import get_weather_data -import spark +from . import v2 PRECONFIGURED_FORMAT = { '1': u'%c %t', @@ -249,7 +249,7 @@ def format_weather_data(format_line, location, override_location, full_address, if format_line == "j1": return render_json(data['data']) if format_line[:2] == "v2": - return spark.main(location, + return v2.main(location, override_location=override_location, full_address=full_address, data=data, view=format_line) diff --git a/lib/spark.py b/lib/view/v2.py similarity index 99% rename from lib/spark.py rename to lib/view/v2.py index a78887a..acb2151 100644 --- a/lib/spark.py +++ b/lib/view/v2.py @@ -42,7 +42,7 @@ from babel.dates import format_datetime from globals import WWO_KEY import constants import translations -import wttr_line +from . import line as wttr_line if not sys.version_info >= (3, 0): reload(sys) # noqa: F821