From a447ae2af332ab431a7c1d4c2411fd282f5bec15 Mon Sep 17 00:00:00 2001 From: Gijs Molenaar Date: Wed, 9 Jan 2019 10:50:12 +0200 Subject: [PATCH] fix last mypy warnings --- .gitignore | 5 +++-- Purr/Plugins/local_pychart/bar_plot.py | 2 +- Purr/Plugins/local_pychart/line_plot.py | 2 +- Purr/Plugins/local_pychart/pie_plot.py | 2 +- Purr/Plugins/local_pychart/rose_plot.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 874d00e..dfd454e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build MANIFEST .mypy_cache/ -.venv2/ dist/ -*.pyc \ No newline at end of file +*.pyc +.venv*/ +purr.egg-info/ diff --git a/Purr/Plugins/local_pychart/bar_plot.py b/Purr/Plugins/local_pychart/bar_plot.py index 1d64fc9..ef4ce38 100644 --- a/Purr/Plugins/local_pychart/bar_plot.py +++ b/Purr/Plugins/local_pychart/bar_plot.py @@ -21,7 +21,7 @@ from . import pychart_util from .pychart_types import * -fill_styles = None +fill_styles = iter([]) # type: ignore _keys = { "direction": (StringType, "vertical", diff --git a/Purr/Plugins/local_pychart/line_plot.py b/Purr/Plugins/local_pychart/line_plot.py index 9cd9cc1..b18b709 100644 --- a/Purr/Plugins/local_pychart/line_plot.py +++ b/Purr/Plugins/local_pychart/line_plot.py @@ -23,7 +23,7 @@ from .pychart_types import * default_width = 1.2 -line_style_itr = None +line_style_itr = iter([]) # type: ignore _keys = { 'data': (AnyType, None, pychart_util.data_desc), diff --git a/Purr/Plugins/local_pychart/pie_plot.py b/Purr/Plugins/local_pychart/pie_plot.py index 92ad94b..40e6790 100644 --- a/Purr/Plugins/local_pychart/pie_plot.py +++ b/Purr/Plugins/local_pychart/pie_plot.py @@ -33,7 +33,7 @@ class T(chart_object.T): "radius": (UnitType, None, "The radius of the pie."), "line_style": (line_style.T, line_style.default, "The style of the outer edge of each pie slice."), - "fill_styles": (ListType, fill_style.standards.list(), + "fill_styles": (ListType, fill_style.standards.list(), # type: ignore """The fill style of each item. The length of the list should be equal to the length of the data. """), diff --git a/Purr/Plugins/local_pychart/rose_plot.py b/Purr/Plugins/local_pychart/rose_plot.py index 73a0a5a..4c79a58 100644 --- a/Purr/Plugins/local_pychart/rose_plot.py +++ b/Purr/Plugins/local_pychart/rose_plot.py @@ -30,7 +30,7 @@ class T(chart_object.T): "center": (CoordType, None, ""), "base_radius": (NumberType, None, ""), "line_style": (line_style.T, line_style.T(color=color.black, width=0.3), ""), - "fill_styles": (list, fill_style.standards.list()[:], + "fill_styles": (list, fill_style.standards.list()[:], # type: ignore """The fill style of each item. The length of the list should be equal to the length of the data. """),