MCPcopy Create free account
hub / github.com/cdgriffith/Box / __dir__

Method __dir__

box/box.py:390–405  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

388 raise BoxTypeError('unhashable type: "Box"')
389
390 def __dir__(self) -> list[str]:
391 items = set(super().__dir__())
392 # Only show items accessible by dot notation
393 for key in self.keys():
394 key = str(key)
395 if key.isidentifier() and not iskeyword(key):
396 items.add(key)
397
398 for key in self.keys():
399 if key not in items:
400 if self._box_config["conversion_box"]:
401 key = self._safe_attr(key)
402 if key:
403 items.add(key)
404
405 return list(items)
406
407 def __contains__(self, item):
408 in_me = super().__contains__(item)

Callers

nothing calls this directly

Calls 2

keysMethod · 0.95
_safe_attrMethod · 0.95

Tested by

no test coverage detected