Skip to content

Commit

Permalink
move cudf_accessor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicBboy committed Jan 27, 2023
1 parent 2873068 commit aee1811
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion pandera/core/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import warnings
from enum import Enum
from functools import partial, wraps
from inspect import signature, Parameter, Signature, _empty
from inspect import signature, Parameter, Signature, _empty # type: ignore
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union

import pandas as pd
Expand Down
4 changes: 2 additions & 2 deletions pandera/typing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
else:
GenericDtype = TypeVar( # type: ignore
"GenericDtype",
bound=Union[
bound=Union[ # type: ignore
bool,
int,
str,
Expand Down Expand Up @@ -134,7 +134,7 @@
],
)

DataFrameModel = TypeVar("Schema", bound="DataFrameModel") # type: ignore
DataFrameModel = TypeVar("DataFrameModel", bound="DataFrameModel") # type: ignore


# pylint:disable=invalid-name
Expand Down
12 changes: 9 additions & 3 deletions pandera/typing/cudf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@

import pandas as pd

from ..errors import SchemaError, SchemaInitError
from .common import DataFrameBase, GenericDtype, IndexBase, Schema, SeriesBase
from pandera.errors import SchemaError, SchemaInitError
from pandera.typing.common import (
DataFrameBase,
GenericDtype,
IndexBase,
DataFrameModel,
SeriesBase,
)
from .formats import Formats

try:
Expand Down Expand Up @@ -50,7 +56,7 @@ def __class_getitem__(cls, item):
if TYPE_CHECKING:
T = TypeVar("T") # pragma: no cover
else:
T = Schema
T = DataFrameModel

# pylint:disable=too-few-public-methods
class DataFrame(DataFrameBase, cudf.DataFrame, Generic[T]):
Expand Down
2 changes: 1 addition & 1 deletion tests/cudf/test_cudf_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from pandera import cudf_accessor
from pandera.accessors import cudf_accessor


# pylint: disable=too-few-public-methods
Expand Down

0 comments on commit aee1811

Please sign in to comment.