Skip to content

Commit

Permalink
REF: Simplify Twine.available_manifest_strands property calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Apr 5, 2022
1 parent 103c4fd commit d6df9e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions twined/twine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -214,15 +214,15 @@ 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

@property
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

Expand Down

0 comments on commit d6df9e3

Please sign in to comment.