Skip to content

Commit

Permalink
Add type annotations to custom expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Porto Veronese committed Jul 25, 2024
1 parent a8ba699 commit d8338a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gladeparser/expressions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from typing import Tuple
import polars as pl


def filter_by_valid_redshifts(zmin: float = 0.0):
def filter_by_valid_redshifts(zmin: float = 0.0) -> Tuple[pl.Expr, pl.Expr]:
return (pl.col("z_cmb") > zmin, pl.col("z_cmb").is_not_null())


def filter_by_catalog_name(catalog_name: str):
def filter_by_catalog_name(catalog_name: str) -> Tuple[pl.Expr]:
return (pl.col(catalog_name).is_not_null(),)


Expand Down

0 comments on commit d8338a7

Please sign in to comment.