Skip to content

Commit

Permalink
chore: Remove unused variables
Browse files Browse the repository at this point in the history
These variables are always overwritten before use.
  • Loading branch information
l0b0 committed Jul 6, 2021
1 parent dd58278 commit 97dc47d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion pystac/extensions/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,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

0 comments on commit 97dc47d

Please sign in to comment.