Skip to content

Commit

Permalink
fix: type signature of __init__ for pystac v1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Apr 2, 2024
1 parent 2de4d5b commit 9c5e114
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pystac_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import pystac.utils
import pystac.validation
from pystac import CatalogType, Collection
from pystac.layout import HrefLayoutStrategy
from requests import Request

from pystac_client._utils import Modifiable, call_modifier
Expand Down Expand Up @@ -71,6 +72,7 @@ def __init__(
extra_fields: Optional[Dict[str, Any]] = None,
href: Optional[str] = None,
catalog_type: CatalogType = CatalogType.ABSOLUTE_PUBLISHED,
strategy: HrefLayoutStrategy | None = None,
*,
modifier: Optional[Callable[[Modifiable], None]] = None,
**kwargs: Dict[str, Any],
Expand All @@ -83,6 +85,7 @@ def __init__(
extra_fields=extra_fields,
href=href,
catalog_type=catalog_type,
strategy=strategy,
**kwargs,
)
self.modifier = modifier
Expand Down
5 changes: 5 additions & 0 deletions pystac_client/collection_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
)

import pystac
import pystac.layout

from pystac_client._utils import Modifiable, call_modifier
from pystac_client.conformance import ConformanceClasses
Expand Down Expand Up @@ -47,6 +48,8 @@ def __init__(
keywords: Optional[List[str]] = None,
providers: Optional[List[pystac.Provider]] = None,
summaries: Optional[pystac.Summaries] = None,
assets: dict[str, pystac.Asset] | None = None,
strategy: pystac.layout.HrefLayoutStrategy | None = None,
*,
modifier: Optional[Callable[[Modifiable], None]] = None,
**kwargs: Dict[str, Any],
Expand All @@ -65,6 +68,8 @@ def __init__(
keywords,
providers,
summaries,
assets,
strategy,
**kwargs,
)
# error: Cannot assign to a method [assignment]
Expand Down

0 comments on commit 9c5e114

Please sign in to comment.