From d6df9e3f27b210a37e488f18ae8b337cb79aab36 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 5 Apr 2022 12:48:46 +0100 Subject: [PATCH] REF: Simplify Twine.available_manifest_strands property calculation --- twined/twine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twined/twine.py b/twined/twine.py index ea0fdf8..081b026 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -49,7 +49,7 @@ def __init__(self, **kwargs): setattr(self, name, strand) self._available_strands = set(trim_suffix(name, "_schema") for name in vars(self)) - self._available_manifest_strands = set(set(self._available_strands) & set(MANIFEST_STRANDS)) + self._available_manifest_strands = self._available_strands & set(MANIFEST_STRANDS) def _load_twine(self, source=None): """Load twine from a *.json filename, file-like or a json string and validates twine contents.""" @@ -214,7 +214,7 @@ def _validate_all_expected_datasets_are_present_in_manifest(self, manifest_kind, def available_strands(self): """Get the names of strands that are found in this twine. - :return tuple: + :return set: """ return self._available_strands @@ -222,7 +222,7 @@ def available_strands(self): def available_manifest_strands(self): """Get the names of the manifest strands that are found in this twine. - :return tuple: + :return set: """ return self._available_manifest_strands