From 315f94b2016e61877b9845ee0da834db5e110604 Mon Sep 17 00:00:00 2001 From: "P. Sai Vinay" <33659563+V1NAY8@users.noreply.github.com> Date: Tue, 7 Sep 2021 22:09:19 +0530 Subject: [PATCH] Add excluded lines for coverage and improve coverage --- eland/plotting/_matplotlib/hist.py | 17 +++++------------ noxfile.py | 1 + setup.cfg | 4 ++++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/eland/plotting/_matplotlib/hist.py b/eland/plotting/_matplotlib/hist.py index 37efda0..ddea852 100644 --- a/eland/plotting/_matplotlib/hist.py +++ b/eland/plotting/_matplotlib/hist.py @@ -27,18 +27,11 @@ except ImportError: # pandas>=1.3.0 from pandas.core.dtypes.generic import ABCIndex -try: # pandas>=1.2.0 - from pandas.plotting._matplotlib.tools import ( # type: ignore - create_subplots, - flatten_axes, - set_ticks_props, - ) -except ImportError: # pandas<1.2.0 - from pandas.plotting._matplotlib.tools import ( # type: ignore - _flatten as flatten_axes, - _set_ticks_props as set_ticks_props, - _subplots as create_subplots, - ) +from pandas.plotting._matplotlib.tools import ( # type: ignore + create_subplots, + flatten_axes, + set_ticks_props, +) from eland.utils import try_sort diff --git a/noxfile.py b/noxfile.py index 7230355..e5ec1b0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -110,6 +110,7 @@ def test(session, pandas_version: str): "--cov-report", "term-missing", "--cov=eland/", + "--cov-config=setup.cfg", "--doctest-modules", "--nbval", *(session.posargs or ("eland/", "tests/")), diff --git a/setup.cfg b/setup.cfg index cb6a426..67aadcb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,3 +2,7 @@ profile = black [mypy] plugins = numpy.typing.mypy_plugin +[report] +exclude_lines= + @abstractmethod + if TYPE_CHECKING: