-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
modernize expression_lib
1 parent
7a353c3
commit f87f5b8
Showing
7 changed files
with
57 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
example/derive_expression/expression_lib/expression_lib/panic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
import polars as pl | ||
from polars.type_aliases import IntoExpr | ||
from polars.plugins import register_plugin_function | ||
|
||
from expression_lib.utils import parse_into_expr | ||
from pathlib import Path | ||
from expression_lib._utils import LIB | ||
|
||
if TYPE_CHECKING: | ||
from expression_lib._typing import IntoExpr | ||
|
||
|
||
def panic(expr: IntoExpr) -> pl.Expr: | ||
expr = parse_into_expr(expr) | ||
return register_plugin_function( | ||
plugin_path=Path(__file__).parent, | ||
plugin_path=LIB, | ||
args=[expr], | ||
function_name="panic", | ||
) |
48 changes: 0 additions & 48 deletions
48
example/derive_expression/expression_lib/expression_lib/utils.py
This file was deleted.
Oops, something went wrong.