From 5fadbed20bc8a2b452bec566b413ea2e62696b38 Mon Sep 17 00:00:00 2001 From: chenjiandongx Date: Thu, 31 Aug 2017 09:45:16 +0800 Subject: [PATCH] code clean: follow pep8 --- pyecharts/base.py | 4 ++-- pyecharts/constants.py | 1 + test/test_geo.py | 2 +- test/test_page.py | 7 +++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyecharts/base.py b/pyecharts/base.py index 98146df5..4967fe3c 100644 --- a/pyecharts/base.py +++ b/pyecharts/base.py @@ -5,8 +5,8 @@ import json import uuid import random import datetime - from pprint import pprint + from pyecharts.option import get_all_options from pyecharts import template from pyecharts import utils @@ -319,7 +319,7 @@ class Base(object): v_lst.append(v) return k_lst, v_lst - def _config_components(self,is_visualmap=False, + def _config_components(self, is_visualmap=False, is_datazoom_show=False, is_more_utils=False, **kwargs): diff --git a/pyecharts/constants.py b/pyecharts/constants.py index e0d66ba7..0749c750 100644 --- a/pyecharts/constants.py +++ b/pyecharts/constants.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import os import json import codecs + from pyecharts.utils import get_resource_dir diff --git a/test/test_geo.py b/test/test_geo.py index ebe7dea7..40f095f7 100644 --- a/test/test_geo.py +++ b/test/test_geo.py @@ -236,7 +236,7 @@ def test_geo(): geo.render() # geo_guangdong_province - data =[ + data = [ ('汕头市', 50), ('汕尾市', 60), ('揭阳市', 35), ('阳江市', 44), ('肇庆市', 72) ] geo = Geo("广东城市空气质量", "data from pm2.5", title_color="#fff", title_pos="center", diff --git a/test/test_page.py b/test/test_page.py index 4b8dc162..5d8ea72b 100644 --- a/test/test_page.py +++ b/test/test_page.py @@ -100,10 +100,9 @@ def test_more(): attr = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] line = Line("折线图示例") line.add("最高气温", attr, [11, 11, 15, 13, 12, 13, 10], - mark_point=["max", "min"], - mark_line=["average"]) - line.add("最低气温", attr, [1, -2, 2, 5, 3, 2, 0], mark_point=["max", "min"], - mark_line=["average"]) + mark_point=["max", "min"], mark_line=["average"]) + line.add("最低气温", attr, [1, -2, 2, 5, 3, 2, 0], + mark_point=["max", "min"], mark_line=["average"]) page.add(line) # pie