From 32ba6ad113b15ebadf1ecabe41498c1374b017f3 Mon Sep 17 00:00:00 2001 From: Paddy Roddy Date: Wed, 13 Sep 2023 16:43:29 +0100 Subject: [PATCH] Add `page` typing --- heracles/catalog/filters.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/heracles/catalog/filters.py b/heracles/catalog/filters.py index 64c14d4..d8406ba 100644 --- a/heracles/catalog/filters.py +++ b/heracles/catalog/filters.py @@ -24,6 +24,8 @@ import healpy as hp import numpy as np +from .base import CatalogPage + class InvalidValueFilter: """Filter invalid values from a catalogue.""" @@ -59,7 +61,7 @@ def __repr__(self) -> str: args = ", ".join(args) return f"{name}({args})" - def __call__(self, page: TypeVar("Unknown")) -> None: + def __call__(self, page: CatalogPage) -> None: """Filter a catalog page. Args: @@ -120,7 +122,7 @@ def __repr__(self) -> str: lon, lat = self.lonlat return f"{name}(..., {lon!r}, {lat!r})" - def __call__(self, page: TypeVar("Unknown")) -> None: + def __call__(self, page: CatalogPage) -> None: """Filter catalog page. Args: