MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / is_

Method is_

tools/python-3.11.9-amd64/Lib/tomllib/_parser.py:175–190  ·  view source on GitHub ↗
(self, key: Key, flag: int)

Source from the content-addressed store, hash-verified

173 cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
174
175 def is_(self, key: Key, flag: int) -> bool:
176 if not key:
177 return False # document root has no flags
178 cont = self._flags
179 for k in key[:-1]:
180 if k not in cont:
181 return False
182 inner_cont = cont[k]
183 if flag in inner_cont["recursive_flags"]:
184 return True
185 cont = inner_cont["nested"]
186 key_stem = key[-1]
187 if key_stem in cont:
188 cont = cont[key_stem]
189 return flag in cont["flags"] or flag in cont["recursive_flags"]
190 return False
191
192
193class NestedDict:

Callers 4

parse_inline_tableFunction · 0.95
create_dict_ruleFunction · 0.45
create_list_ruleFunction · 0.45
key_value_ruleFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected