From 6717a55f20b2d28c8fb41d2b86996f68a7d0d3eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:05:32 +0000 Subject: [PATCH 1/2] build(deps-dev): bump ruff from 0.0.284 to 0.0.285 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.285. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.284...v0.0.285) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bd0a5b671..dd314a27b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ test = [ "pytest-mock~=3.10", "pytest-recording~=0.13", "pytest~=7.3", - "ruff==0.0.284", + "ruff==0.0.285", "types-html5lib~=1.1", "types-orjson~=3.6", "types-python-dateutil~=2.8", From 390cb0729eb65bf165dfe5c44988c79b18521b84 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Fri, 18 Aug 2023 09:21:28 -0600 Subject: [PATCH 2/2] fix: use isinstance Thanks ruff! --- pystac/layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystac/layout.py b/pystac/layout.py index ccd71c14e..8ec776009 100644 --- a/pystac/layout.py +++ b/pystac/layout.py @@ -188,7 +188,7 @@ def _get_template_value(self, stac_object: STACObject, template_var: str) -> Any v: Any = prop_source for prop in template_var.split("."): - if type(v) is dict: + if isinstance(v, dict): if prop not in v: raise error v = v[prop]