Skip to content

Commit

Permalink
fix lint, docs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicBboy committed Nov 9, 2021
1 parent d368f12 commit e0fa3bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
]

doctest_global_setup = """
import platform
import sys
import pandas as pd
import numpy as np
Expand All @@ -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 = (
Expand Down
6 changes: 6 additions & 0 deletions docs/source/modin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ below we'll use the :ref:`class-based API <schema_models>` to define a
:py:class:`SchemaModel` for validation.

.. testcode:: scaling_modin
:skipif: SKIP_MODIN

import modin.pandas as pd
import pandas as pd
Expand Down Expand Up @@ -58,6 +59,7 @@ below we'll use the :ref:`class-based API <schema_models>` to define a


.. testoutput:: scaling_modin
:skipif: SKIP_MODIN

state city price
0 FL Orlando 8
Expand All @@ -73,6 +75,7 @@ modin dataframes at runtime:


.. testcode:: scaling_modin
:skipif: SKIP_MODIN

@pa.check_types
def function(df: DataFrame[Schema]) -> DataFrame[Schema]:
Expand All @@ -82,6 +85,7 @@ modin dataframes at runtime:


.. testoutput:: scaling_modin
:skipif: SKIP_MODIN

state city price
3 CA San Francisco 16
Expand All @@ -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),
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pandera/typing/koalas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit e0fa3bb

Please sign in to comment.