MCPcopy
hub / github.com/matplotlib/matplotlib / _is_already_allowed

Method _is_already_allowed

tools/stubtest.py:22–28  ·  view source on GitHub ↗
(self, parts)

Source from the content-addressed store, hash-verified

20 self.existing_allowed = existing_allowed
21
22 def _is_already_allowed(self, parts):
23 # Skip outputting a path if it's already allowed before.
24 candidates = ['.'.join(parts[:s]) for s in range(1, len(parts))]
25 for allow in self.existing_allowed:
26 if any(allow.fullmatch(path) for path in candidates):
27 return True
28 return False
29
30 def visit_FunctionDef(self, node):
31 # delete_parameter adds a private sentinel value that leaks

Callers 2

visit_FunctionDefMethod · 0.95
visit_ClassDefMethod · 0.95

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected