From f51fd0f7e97618b0114f26a39d94e9c48b759582 Mon Sep 17 00:00:00 2001 From: Simon Kassel Date: Mon, 11 May 2020 15:12:59 -0400 Subject: [PATCH 1/3] fix make_absolute_href --- pystac/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pystac/utils.py b/pystac/utils.py index 4277dcb76..f6574e3c8 100644 --- a/pystac/utils.py +++ b/pystac/utils.py @@ -87,8 +87,12 @@ def make_absolute_href(source_href, start_href=None, start_is_dir=False): Returns: str: The absolute HREF. If the source_href is already an absolute href, - then it will be returned unchanged. + then it will be returned unchanged. If the source_href it None, it will + return None. """ + if source_href == None: + return None + if start_href is None: start_href = os.getcwd() start_is_dir = True From 615e4bb28268a031fef9faa02ecac92d9c11947c Mon Sep 17 00:00:00 2001 From: Simon Kassel Date: Mon, 11 May 2020 16:25:35 -0400 Subject: [PATCH 2/3] styling changes --- pystac/eo.py | 16 ++++++++-------- pystac/utils.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pystac/eo.py b/pystac/eo.py index 9b022ddd7..0bc7f2556 100644 --- a/pystac/eo.py +++ b/pystac/eo.py @@ -374,14 +374,14 @@ class Band: as measured at half the maximum transmission, in micrometers (μm). """ def __init__( - self, - name=None, - common_name=None, - description=None, - gsd=None, - accuracy=None, - center_wavelength=None, - full_width_half_max=None, + self, + name=None, + common_name=None, + description=None, + gsd=None, + accuracy=None, + center_wavelength=None, + full_width_half_max=None, ): self.name = name self.common_name = common_name diff --git a/pystac/utils.py b/pystac/utils.py index f6574e3c8..1d0c646fa 100644 --- a/pystac/utils.py +++ b/pystac/utils.py @@ -90,7 +90,7 @@ def make_absolute_href(source_href, start_href=None, start_is_dir=False): then it will be returned unchanged. If the source_href it None, it will return None. """ - if source_href == None: + if source_href is None: return None if start_href is None: From 92ce7207cd81f76943c36bc38bc0545622b942a4 Mon Sep 17 00:00:00 2001 From: Simon Kassel Date: Tue, 12 May 2020 11:43:54 -0400 Subject: [PATCH 3/3] revert styling changes --- pystac/eo.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pystac/eo.py b/pystac/eo.py index 0bc7f2556..9b022ddd7 100644 --- a/pystac/eo.py +++ b/pystac/eo.py @@ -374,14 +374,14 @@ class Band: as measured at half the maximum transmission, in micrometers (μm). """ def __init__( - self, - name=None, - common_name=None, - description=None, - gsd=None, - accuracy=None, - center_wavelength=None, - full_width_half_max=None, + self, + name=None, + common_name=None, + description=None, + gsd=None, + accuracy=None, + center_wavelength=None, + full_width_half_max=None, ): self.name = name self.common_name = common_name