Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove unused locals #519

Merged
merged 3 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pystac/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pystac/extensions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion pystac/extensions/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions pystac/serialization/common_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions pystac/validation/schema_uri_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down