summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-03 15:43:42 +0100
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-04 11:31:48 +0100
commitc9089dd7213c0da70743635cc2297796103a341f (patch)
treec1125deb585b4dc05734f11a43cbf3fac537eb85
parentc4a24ca257d06f27d584329bf3cc2283262c61ce (diff)
downloadbuildstream-c9089dd7213c0da70743635cc2297796103a341f.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 ade8aaa71..f9ac09e53 100644
--- a/src/buildstream/_yaml.pyx
+++ b/src/buildstream/_yaml.pyx
@@ -1119,26 +1119,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