MCPcopy Index your code
hub / github.com/bpython/bpython / add_config_attr

Method add_config_attr

bpython/curtsiesfrontend/manual_readline.py:58–63  ·  view source on GitHub ↗
(self, config_attr, func)

Source from the content-addressed store, hash-verified

56 raise ValueError(f"return type of function {func!r} not recognized")
57
58 def add_config_attr(self, config_attr, func):
59 if config_attr in self.awaiting_config:
60 raise ValueError(
61 f"config attribute {config_attr!r} already has a mapping"
62 )
63 self.awaiting_config[config_attr] = func
64
65 def call(self, key, **kwargs):
66 func = self[key]

Callers 2

test_configMethod · 0.45
add_to_configMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_configMethod · 0.36