Skip to content

Commit

Permalink
fix dict subsetting for 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jacgoldsm committed Sep 25, 2023
1 parent cf4a121 commit a45f36c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions osos/_implementations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
from pandas.core.groupby.generic import SeriesGroupBy
from pandas.core.window.rolling import Rolling as RollingWindow
from typing import Union, Callable, Iterable, Any, overload, Optional,List,Tuple
from typing import Union, Callable, Iterable, Any, overload, Optional,List,Tuple,Dict
from warnings import warn

from .window import EmptyWindow, ConcreteWindowSpec
Expand Down Expand Up @@ -104,7 +104,7 @@ def sum_func(series: SeriesType, *args, **kwargs) -> pd.Series:
def udf_func(
series: pd.Series,
udf: Callable,
args_and_kwargs: dict[Iterable, dict[str, Any]],
args_and_kwargs: Dict[Iterable, Dict[str, Any]],
_over=None,
) -> pd.Series:
args, kwargs = args_and_kwargs.get("args"), args_and_kwargs.get("kwargs")
Expand Down Expand Up @@ -568,7 +568,7 @@ def nanvl_func(col1: pd.Series, col2: pd.Series):

def percentile_approx_func(
col: pd.Series,
percentage: Union[pd.Series, float, List[float], tuple[float]],
percentage: Union[pd.Series, float, List[float], Tuple[float]],
accuracy: Union[pd.Series, float] = 10000,
):

Expand Down Expand Up @@ -686,7 +686,7 @@ def struct_func(
def struct_func(
*cols: Union[
pd.Series,
Union[List[pd.Series], tuple[pd.Series, ...]],
Union[List[pd.Series], Tuple[pd.Series, ...]],
]
):

Expand Down
2 changes: 1 addition & 1 deletion osos/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class FuncOrOp(Node):


class ForwardRef:
def __init__(self, reference: str, args: Union[list, None] = None):
def __init__(self, reference: str, args: Union[List, None] = None):
self.reference = reference
self.args = args if args is not None else []

Expand Down
4 changes: 2 additions & 2 deletions osos/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
from decimal import Decimal

from typing import List,Tuple
from typing import List,Tuple,Dict

# integral
IntegerType = lambda: np.int32
Expand Down Expand Up @@ -35,7 +35,7 @@

# complex
ArrayType = lambda elementType, containsNull=False: List
MapType = lambda keyType, elementType, valueContainsNull=False: dict
MapType = lambda keyType, elementType, valueContainsNull=False: Dict
StructType = lambda fields: np.array
StructField = lambda name,dataType,nullable=False: Tuple

Expand Down

0 comments on commit a45f36c

Please sign in to comment.