MCPcopy Index your code
hub / github.com/ipython/ipython / dict_key_matcher

Method dict_key_matcher

IPython/core/completer.py:3014–3019  ·  view source on GitHub ↗

Match string keys in a dictionary, after e.g. ``foo[``.

(self, context: CompletionContext)

Source from the content-addressed store, hash-verified

3012
3013 @context_matcher()
3014 def dict_key_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
3015 """Match string keys in a dictionary, after e.g. ``foo[``."""
3016 matches = self.dict_key_matches(context.token)
3017 return _convert_matcher_v1_result_to_v2(
3018 matches, type="dict key", suppress_if_matches=True
3019 )
3020
3021 def dict_key_matches(self, text: str) -> list[str]:
3022 """Match string keys in a dictionary, after e.g. ``foo[``.

Callers

nothing calls this directly

Calls 2

dict_key_matchesMethod · 0.95

Tested by

no test coverage detected