summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-03 15:43:42 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:03 +0000
commit8f74f13a9aa5c14bdf2ab751cce2dde856ba10d6 (patch)
tree84bd7fc20dabbfaf4fc102b0df5105d14e4bdb11
parent8c9f41922ad16f8a031ac612bb35e493e8581380 (diff)
downloadbuildstream-8f74f13a9aa5c14bdf2ab751cce2dde856ba10d6.tar.gz
_yaml: Remove 'is_node', which is not used in the codebase anymore
A direct replacement would be isinstance(obj, MappingNode) if someone really needs it.
-rw-r--r--src/buildstream/_yaml.pyx20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx
index 1bdc43e6d..176f2be59 100644
--- a/src/buildstream/_yaml.pyx
+++ b/src/buildstream/_yaml.pyx
@@ -1116,26 +1116,6 @@ cpdef ProvenanceInformation node_get_provenance(Node node, str key=None, list in
return ProvenanceInformation(nodeish)
-# is_node()
-#
-# A test method which returns whether or not the passed in value
-# is a valid YAML node. It is not valid to call this on a Node
-# object which is not a Mapping.
-#
-# Args:
-# maybenode (any): The object to test for nodeness
-#
-# Returns:
-# (bool): Whether or not maybenode was a Node
-#
-def is_node(maybenode):
- # It's a programming error to give this a Node which isn't a mapping
- # so assert that.
- assert (type(maybenode) not in [ScalarNode, SequenceNode])
- # Now return the type check
- return type(maybenode) is MappingNode
-
-
# new_synthetic_file()
#
# Create a new synthetic mapping node, with an associated file entry