|
24 | 24 | from .util import * |
25 | 25 |
|
26 | 26 | if TYPE_CHECKING: |
27 | | - from .delta_io import sink_delta as sink_delta |
28 | | - from .join import filtered_join, filtered_join_asof |
| 27 | + # These names are provided at runtime by the `from .X import *` star imports above. |
| 28 | + # This block re-declares them so static analysis can resolve the targets passed to |
| 29 | + # `@functools.wraps(...)` on the PIOTOperations methods below. TC004 is suppressed |
| 30 | + # because ruff cannot see that the star imports already satisfy the runtime use. |
| 31 | + from .delta_io import sink_delta as sink_delta # noqa: TC004 |
| 32 | + from .join import filtered_join, filtered_join_asof # noqa: TC004 |
29 | 33 | from .lazy_clickhouse_reader import scan_clickhouse |
30 | | - from .lazy_clickhouse_writer import sink_clickhouse |
31 | | - from .lazy_iter_rows import iter_rows |
| 34 | + from .lazy_clickhouse_writer import sink_clickhouse # noqa: TC004 |
| 35 | + from .lazy_iter_rows import iter_rows # noqa: TC004 |
32 | 36 | from .multi_source import FilterSpec, multi_source |
33 | | - from .ts import ts_with_columns |
34 | | - from .util import filter_no_pushdown, with_columns_topo |
| 37 | + from .ts import ts_with_columns # noqa: TC004 |
| 38 | + from .util import filter_no_pushdown, with_columns_topo # noqa: TC004 |
35 | 39 |
|
36 | 40 | if TYPE_CHECKING: |
37 | 41 | # We don't want to import `execute_on_ray` at the top level; however |
@@ -70,9 +74,9 @@ def filtered_join(self, *args, **kwargs) -> pl.LazyFrame: |
70 | 74 | return self._lf.join(*args, **kwargs) |
71 | 75 | return filtered_join(self._lf, *args, **kwargs) |
72 | 76 |
|
73 | | - @functools.wraps(cache_parquet) # noqa: F405 |
| 77 | + @functools.wraps(cache_parquet) |
74 | 78 | def cache_parquet(self, *args, **kwargs) -> pl.LazyFrame: |
75 | | - return cache_parquet(self._lf, *args, **kwargs) # noqa: F405 |
| 79 | + return cache_parquet(self._lf, *args, **kwargs) |
76 | 80 |
|
77 | 81 | @functools.wraps(_execute_on_ray_proto) |
78 | 82 | def execute_on_ray(self, *args, **kwargs) -> pl.LazyFrame: |
|
0 commit comments