Skip to content

Commit 09af502

Browse files
authored
Merge pull request #159 from trungdong/153-provrecordget_attribute
Fixed documentation for ProvRecord.get_attribute() #153
2 parents ec9d8c8 + 44d9939 commit 09af502

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/prov/model.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def __init__(self, bundle, identifier, attributes=None):
242242
"""
243243
self._bundle = bundle
244244
self._identifier = identifier
245-
self._attributes = defaultdict(set)
245+
self._attributes: dict[QualifiedName, set] = defaultdict(set)
246246
if attributes:
247247
self.add_attributes(attributes)
248248

@@ -273,12 +273,13 @@ def add_asserted_type(self, type_identifier):
273273
"""
274274
self._attributes[PROV_TYPE].add(type_identifier)
275275

276-
def get_attribute(self, attr_name):
276+
def get_attribute(self, attr_name) -> set:
277277
"""
278278
Returns the attribute of the given name.
279279
280280
:param attr_name: Name of the attribute.
281-
:return: Tuple (name, value)
281+
:return: Set of value(s) of the specified attribute.
282+
:rtype: set
282283
"""
283284
attr_name = self._bundle.valid_qualified_name(attr_name)
284285
return self._attributes[attr_name]

0 commit comments

Comments
 (0)