diff --git a/pystac/catalog.py b/pystac/catalog.py index be31b9eab..7acbb40ea 100644 --- a/pystac/catalog.py +++ b/pystac/catalog.py @@ -626,7 +626,6 @@ def generate_subcatalogs( template: str, defaults: Optional[Dict[str, Any]] = None, parent_ids: Optional[List[str]] = None, - **kwargs: Any, ) -> List["Catalog"]: """Walks through the catalog and generates subcatalogs for items based on the template string. diff --git a/pystac/extensions/base.py b/pystac/extensions/base.py index b8f27ad0c..9633f3af2 100644 --- a/pystac/extensions/base.py +++ b/pystac/extensions/base.py @@ -57,7 +57,7 @@ class PropertiesExtension(ABC): ``additional_read_properties`` will take precedence. """ - def _get_property(self, prop_name: str, typ: Type[P]) -> Optional[P]: + def _get_property(self, prop_name: str, _typ: Type[P]) -> Optional[P]: maybe_property: Optional[P] = self.properties.get(prop_name) if maybe_property is not None: return maybe_property diff --git a/pystac/extensions/label.py b/pystac/extensions/label.py index e7ed694fa..c18721db6 100644 --- a/pystac/extensions/label.py +++ b/pystac/extensions/label.py @@ -391,7 +391,6 @@ def merge_counts(self, other: "LabelOverview") -> "LabelOverview": """ assert self.property_key == other.property_key - new_counts = None if self.counts is None: new_counts = other.counts else: diff --git a/pystac/serialization/common_properties.py b/pystac/serialization/common_properties.py index de9abe563..8ebcc7c27 100644 --- a/pystac/serialization/common_properties.py +++ b/pystac/serialization/common_properties.py @@ -29,7 +29,6 @@ def merge_common_properties( properties_merged = False collection: Optional[Union[pystac.Collection, Dict[str, Any]]] = None - collection_id: Optional[str] = None collection_href: Optional[str] = None stac_version = item_dict.get("stac_version") @@ -79,7 +78,6 @@ def merge_common_properties( collection = pystac.StacIO.default().read_json(collection_href) if collection is not None: - collection_id = None collection_props: Optional[Dict[str, Any]] = None if isinstance(collection, pystac.Collection): collection_id = collection.id diff --git a/pystac/validation/schema_uri_map.py b/pystac/validation/schema_uri_map.py index 0bcd273b9..08b2a5948 100644 --- a/pystac/validation/schema_uri_map.py +++ b/pystac/validation/schema_uri_map.py @@ -77,7 +77,6 @@ class DefaultSchemaUriMap(SchemaUriMap): def _append_base_uri_if_needed(cls, uri: str, stac_version: str) -> Optional[str]: # Only append the base URI if it's not already an absolute URI if "://" not in uri: - base_uri = None for version_range, f in cls.BASE_URIS: if version_range.contains(stac_version): base_uri = f(stac_version) @@ -91,7 +90,6 @@ def _append_base_uri_if_needed(cls, uri: str, stac_version: str) -> Optional[str def get_object_schema_uri( self, object_type: STACObjectType, stac_version: str ) -> Optional[str]: - uri = None is_latest = stac_version == pystac.get_stac_version() if object_type not in self.DEFAULT_SCHEMA_MAP: @@ -315,7 +313,6 @@ def _append_base_uri_if_needed( ) -> Optional[str]: # Only append the base URI if it's not already an absolute URI if "://" not in uri: - base_uri = None for version_range, f in cls.get_base_uris(): if version_range.contains(stac_version): base_uri = f(stac_version)