MCPcopy Index your code
hub / github.com/RustPython/RustPython / add_label

Method add_label

Lib/mailbox.py:1918–1924  ·  view source on GitHub ↗

Add label to list of labels on the message.

(self, label)

Source from the content-addressed store, hash-verified

1916 self._labels = list(labels)
1917
1918 def add_label(self, label):
1919 """Add label to list of labels on the message."""
1920 if isinstance(label, str):
1921 if label not in self._labels:
1922 self._labels.append(label)
1923 else:
1924 raise TypeError('label must be a string: %s' % type(label))
1925
1926 def remove_label(self, label):
1927 """Remove label from the list of labels on the message."""

Callers 10

test_labelsMethod · 0.95
test_labelsMethod · 0.95
test_babyl_to_maildirMethod · 0.95
test_babyl_to_mhMethod · 0.95
test_babyl_to_babylMethod · 0.95
_explain_toMethod · 0.80
_explain_toMethod · 0.80
_explain_toMethod · 0.80
_explain_toMethod · 0.80

Calls 2

isinstanceFunction · 0.85
appendMethod · 0.45

Tested by 6

test_labelsMethod · 0.76
test_labelsMethod · 0.76
test_babyl_to_maildirMethod · 0.76
test_babyl_to_mhMethod · 0.76
test_babyl_to_babylMethod · 0.76