From e0fa3bba100b65ee067322f375f838703d5cc900 Mon Sep 17 00:00:00 2001 From: cosmicBboy Date: Tue, 9 Nov 2021 08:57:25 -0500 Subject: [PATCH] fix lint, docs tests --- docs/source/conf.py | 3 +++ docs/source/modin.rst | 6 ++++++ pandera/typing/koalas.py | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 77c9b06f3..8e47ab41c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -50,6 +50,7 @@ ] doctest_global_setup = """ +import platform import sys import pandas as pd import numpy as np @@ -76,6 +77,8 @@ SKIP_PANDAS_LT_V1 = version.parse(pd.__version__).release < (1, 0) or PY36 SKIP_SCALING = True SKIP_SCHEMA_MODEL = SKIP_PANDAS_LT_V1 or KOALAS_INSTALLED +SKIP_MODIN = platform.system() == "Windows" + """ doctest_default_flags = ( diff --git a/docs/source/modin.rst b/docs/source/modin.rst index 3d5b1bb1b..fc6c58fd2 100644 --- a/docs/source/modin.rst +++ b/docs/source/modin.rst @@ -25,6 +25,7 @@ below we'll use the :ref:`class-based API ` to define a :py:class:`SchemaModel` for validation. .. testcode:: scaling_modin + :skipif: SKIP_MODIN import modin.pandas as pd import pandas as pd @@ -58,6 +59,7 @@ below we'll use the :ref:`class-based API ` to define a .. testoutput:: scaling_modin + :skipif: SKIP_MODIN state city price 0 FL Orlando 8 @@ -73,6 +75,7 @@ modin dataframes at runtime: .. testcode:: scaling_modin + :skipif: SKIP_MODIN @pa.check_types def function(df: DataFrame[Schema]) -> DataFrame[Schema]: @@ -82,6 +85,7 @@ modin dataframes at runtime: .. testoutput:: scaling_modin + :skipif: SKIP_MODIN state city price 3 CA San Francisco 16 @@ -93,6 +97,7 @@ And of course, you can use the object-based API to validate dask dataframes: .. testcode:: scaling_modin + :skipif: SKIP_MODIN schema = pa.DataFrameSchema({ "state": pa.Column(str), @@ -103,6 +108,7 @@ And of course, you can use the object-based API to validate dask dataframes: .. testoutput:: scaling_modin + :skipif: SKIP_MODIN state city price 0 FL Orlando 8 diff --git a/pandera/typing/koalas.py b/pandera/typing/koalas.py index 052338f7f..940ce8f76 100644 --- a/pandera/typing/koalas.py +++ b/pandera/typing/koalas.py @@ -22,7 +22,7 @@ if KOALAS_INSTALLED: - # pylint: disable=too-few-public-methods + # pylint: disable=too-few-public-methods,arguments-renamed class DataFrame(DataFrameBase, ks.DataFrame, Generic[T]): """ Representation of dask.dataframe.DataFrame, only used for type @@ -35,7 +35,7 @@ def __class_getitem__(cls, item): """Define this to override's koalas generic type.""" return _GenericAlias(cls, item) - # pylint:disable=too-few-public-methods + # pylint:disable=too-few-public-methods,arguments-renamed class Series(SeriesBase, ks.Series, Generic[GenericDtype]): """Representation of pandas.Series, only used for type annotation.