From 0d81ac4b58a21bf0f449b21713490b6813ed825e Mon Sep 17 00:00:00 2001 From: advancedxy <807537+advancedxy@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:59:26 +0800 Subject: [PATCH] fix style --- tests/conftest.py | 5 +++-- tests/dataframe/test_intersect.py | 0 tests/dataframe/test_set_ops.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 tests/dataframe/test_intersect.py diff --git a/tests/conftest.py b/tests/conftest.py index 8b97b91566..54a6c2c7fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 @@ -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. diff --git a/tests/dataframe/test_intersect.py b/tests/dataframe/test_intersect.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/dataframe/test_set_ops.py b/tests/dataframe/test_set_ops.py index e4beeabbe7..b82119c1da 100644 --- a/tests/dataframe/test_set_ops.py +++ b/tests/dataframe/test_set_ops.py @@ -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":