Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
advancedxy committed Dec 19, 2024
1 parent 0edf691 commit 0d81ac4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import uuid
from typing import Literal, Dict, Any
from typing import Literal, Any

import pandas as pd
import pyarrow as pa
Expand Down Expand Up @@ -183,7 +183,8 @@ def assert_df_equals(
print(f"Failed assertion for col: {col}")
raise

def check_answer(df: daft.DataFrame, expected_answer: Dict[str, Any], is_sorted: bool = False):

def check_answer(df: daft.DataFrame, expected_answer: dict[str, Any], is_sorted: bool = False):
daft_df = df.to_pandas()
expected_df = daft.from_pydict(expected_answer).to_pandas()
# when this is an empty result, no need to check data types.
Expand Down
Empty file removed tests/dataframe/test_intersect.py
Empty file.
6 changes: 3 additions & 3 deletions tests/dataframe/test_set_ops.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from __future__ import annotations

from typing import Any, Dict
from typing import Any

import daft
from daft import col, DataFrame
import pytest
from tests.conftest import check_answer

def helper(make_df, op: str, left: Dict[str, Any], right: Dict[str, Any], expected: Dict[str, Any]):
def helper(make_df, op: str, left: dict[str, Any], right: dict[str, Any], expected: dict[str, Any]):
df1 = make_df(left)
df2 = make_df(right)
df_helper(op, df1, df2, expected)

def df_helper(op: str, df1: DataFrame, df2: DataFrame, expected: Dict[str, Any]):
def df_helper(op: str, df1: DataFrame, df2: DataFrame, expected: dict[str, Any]):
if op == "intersect":
result = df1.intersect(df2)
elif op == "except_distinct":
Expand Down

0 comments on commit 0d81ac4

Please sign in to comment.