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

Method _deduplicate

IPython/core/completer.py:3738–3750  ·  view source on GitHub ↗
(
        matches: Sequence[AnyCompletion],
    )

Source from the content-addressed store, hash-verified

3736
3737 @staticmethod
3738 def _deduplicate(
3739 matches: Sequence[AnyCompletion],
3740 ) -> Iterable[AnyCompletion]:
3741 filtered_matches: dict[str, AnyCompletion] = {}
3742 for match in matches:
3743 text = match.text
3744 if (
3745 text not in filtered_matches
3746 or filtered_matches[text].type == _UNKNOWN_TYPE
3747 ):
3748 filtered_matches[text] = match
3749
3750 return filtered_matches.values()
3751
3752 @staticmethod
3753 def _sort(matches: Sequence[AnyCompletion]):

Callers 2

_completionsMethod · 0.95
_arrange_and_extractMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected