Lines Matching refs:kind
38 def add_path_resolver(cls, tag, path, kind=None):
44 # matches any kind of a node. `index_check` could be `None`, a boolean
80 if kind is str:
81 kind = ScalarNode
82 elif kind is list:
83 kind = SequenceNode
84 elif kind is dict:
85 kind = MappingNode
86 elif kind not in [ScalarNode, SequenceNode, MappingNode] \
87 and kind is not None:
88 raise ResolverError("Invalid node kind: %s" % kind)
89 cls.yaml_path_resolvers[tuple(new_path), kind] = tag
98 for path, kind in self.resolver_prefix_paths[-1]:
99 if self.check_resolver_prefix(depth, path, kind,
102 prefix_paths.append((path, kind))
104 exact_paths[kind] = self.yaml_path_resolvers[path, kind]
106 for path, kind in self.yaml_path_resolvers:
108 exact_paths[kind] = self.yaml_path_resolvers[path, kind]
110 prefix_paths.append((path, kind))
120 def check_resolver_prefix(self, depth, path, kind,
143 def resolve(self, kind, value, implicit):
144 if kind is ScalarNode and implicit[0]:
156 if kind in exact_paths:
157 return exact_paths[kind]
160 if kind is ScalarNode:
162 elif kind is SequenceNode:
164 elif kind is MappingNode: