Skip to content

Commit

Permalink
refactor(common): remove Validator mixin for better clarity
Browse files Browse the repository at this point in the history
Also removes a redundant function call by directly calling the pattern
match API from the annotation classes.
  • Loading branch information
kszucs authored and cpcloud committed Aug 7, 2023
1 parent 8b841c1 commit 4697e7d
Show file tree
Hide file tree
Showing 34 changed files with 184 additions and 207 deletions.
2 changes: 1 addition & 1 deletion ibis/backends/bigquery/tests/unit/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
from ibis import _
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError

to_sql = ibis.bigquery.compile

Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/clickhouse/tests/test_aggregations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest

import ibis
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError

pytest.importorskip("clickhouse_connect")

Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/dask/tests/execution/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

import ibis
import ibis.expr.datatypes as dt
from ibis.common.annotations import ValidationError
from ibis.common.exceptions import OperationNotDefinedError
from ibis.common.patterns import ValidationError

dd = pytest.importorskip("dask.dataframe")
from dask.dataframe.utils import tm # noqa: E402
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/impala/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import ibis.expr.types as ir
from ibis import util
from ibis.backends.impala import ddl
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError
from ibis.expr import rules

pytest.importorskip("impala")
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/impala/tests/test_unary_builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ibis
import ibis.expr.types as ir
from ibis.backends.impala.tests.conftest import translate
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError


@pytest.fixture(scope="module")
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/pandas/tests/execution/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ibis.backends.pandas.execution import execute
from ibis.backends.pandas.tests.conftest import TestConf as tm
from ibis.backends.pandas.udf import udf
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/pandas/tests/execution/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ibis.backends.pandas.dispatch import pre_execute
from ibis.backends.pandas.execution import execute
from ibis.backends.pandas.tests.conftest import TestConf as tm
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError
from ibis.legacy.udf.vectorized import reduction


Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import ibis.expr.datatypes as dt
import ibis.selectors as s
from ibis import _
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError

try:
import duckdb
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import ibis
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
from ibis.common.annotations import ValidationError
from ibis.common.exceptions import OperationNotDefinedError
from ibis.common.patterns import ValidationError

try:
from google.api_core.exceptions import BadRequest
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
from ibis.backends.pandas.execution.temporal import day_name
from ibis.common.patterns import ValidationError
from ibis.common.annotations import ValidationError

try:
from duckdb import InvalidInputException as DuckDBInvalidInputException
Expand Down
Loading

0 comments on commit 4697e7d

Please sign in to comment.