{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "No Docstrings"
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/IPython/core/completer.py",
  "item_line": 0,
  "item_type": "module",
  "aliases": [
    "IPython.core.completer"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "IPython.core.completer",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Completion for IPython."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This module started as fork of the rlcompleter module in the Python standard library.  The original enhancements made to rlcompleter have been sent upstream and were accepted as of Python 2.3,"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This module now support a wide variety of completion mechanism both available for normal classic Python code, as well as completer for IPython specific Syntax like magics."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "IPython and compatible frontends not only can complete your code, but can help you to input a wide range of characters. In particular we allow you to insert a unicode character using the tab completion mechanism."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Latex and Unicode completion"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Forward completion allows you to easily type a unicode character using its latex name, or unicode long description. To do so type a backslash follow by the relevant name and press tab:"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Using latex completion:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "\\alpha<tab>\nα",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "or using unicode completion:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "\\GREEK SMALL LETTER ALPHA<tab>\nα",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Only valid Python identifiers will complete. Combining characters (like arrow or dots) are also available, unlike latex they need to be put after the their counterpart that is to say, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "F\\\\vec<tab>"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is correct, not "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "\\\\vec<tab>F"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Some browsers are known to display combining characters incorrectly."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Forward latex/unicode completion"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "It is sometime challenging to know how to type a character, if you are using IPython, or any compatible frontend you can prepend backslash to the character and press "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "Tab"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to expand it to its latex form."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "\\α<tab>\n\\alpha",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Both forward and backward completions can be deactivated by setting the "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "Completer.backslash_combining_completions",
              "domain": "std",
              "role": "configtrait",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " option to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "False"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Backward latex completion"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Starting with IPython 6.0, this module can make use of the Jedi library to generate completions both using static analysis of the code, and dynamically inspecting multiple namespaces. Jedi is an autocompletion and static analysis for Python. The APIs attached to this new mechanism is unstable and will raise unless use in an "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "provisionalcompleter",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "IPython.core.completer:provisionalcompleter"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " context manager."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "You will find that the following are experimental:"
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "BulletList",
              "__tag": 4053,
              "ordered": false,
              "start": 1,
              "children": [
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "provisionalcompleter",
                          "reference": {
                            "__type": "LocalRef",
                            "__tag": 4022,
                            "kind": "module",
                            "path": "IPython.core.completer:provisionalcompleter"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineRole",
                          "__tag": 4003,
                          "value": "IPCompleter.completions",
                          "domain": null,
                          "role": "any",
                          "inventory": null
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "Completion",
                          "reference": {
                            "__type": "LocalRef",
                            "__tag": 4022,
                            "kind": "module",
                            "path": "IPython.core.completer:Completion"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "ListItem",
                  "__tag": 4054,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "rectify_completions",
                          "reference": {
                            "__type": "LocalRef",
                            "__tag": 4022,
                            "kind": "module",
                            "path": "IPython.core.completer:rectify_completions"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "note",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "note "
                }
              ]
            },
            {
              "__type": "Paragraph",
              "__tag": 4045,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "better name for "
                },
                {
                  "__type": "CrossRef",
                  "__tag": 4002,
                  "value": "rectify_completions",
                  "reference": {
                    "__type": "LocalRef",
                    "__tag": 4022,
                    "kind": "module",
                    "path": "IPython.core.completer:rectify_completions"
                  },
                  "kind": "module"
                },
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": " ?"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "We welcome any feedback on these new API, and we also encourage you to try this module in debug mode (start IPython with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "--Completer.debug=True"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") in order to have extra logging information if "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "jedi",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "jedi",
                "version": "*",
                "kind": "api",
                "path": "jedi"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is crashing, or if current IPython completer pending deprecations are returning results not yet handled by "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "jedi",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "jedi",
                "version": "*",
                "kind": "api",
                "path": "jedi"
              },
              "kind": "module"
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Using Jedi for tab completion allow snippets like the following to work without having to execute any code:"
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Code",
              "__tag": 4050,
              "value": ">>> myvar = ['hello', 42]\n... myvar[1].bi<tab>",
              "execution_status": null
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Tab completion will be able to infer that "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "myvar[1]"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a real number without executing almost any code unlike the deprecated "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "IPCompleter.greedy",
              "domain": null,
              "role": "any",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " option."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Be sure to update "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "jedi",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "jedi",
                "version": "*",
                "kind": "api",
                "path": "jedi"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to the latest stable version or to try the current development version to get better completions."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Experimental"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "All completions routines are implemented using unified "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Matchers"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " API. The matchers API is provisional and subject to change without notice."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The built-in matchers include:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.dict_key_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ":  dictionary key completions,"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.magic_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ": completions for magics,"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.unicode_name_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ",   "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.fwd_unicode_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "   and "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.latex_name_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ": see "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "Forward latex/unicode completion",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ","
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "back_unicode_name_matcher",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "IPython.core.completer:back_unicode_name_matcher"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "back_latex_name_matcher",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "IPython.core.completer:back_latex_name_matcher"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ": see "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "Backward latex completion",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ","
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.file_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ": paths to files and directories,"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.python_func_kw_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " - function keywords,"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.python_matches",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " - globals and attributes (v1 API),"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "IPCompleter.jedi_matcher"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " - static analysis with Jedi,"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "IPCompleter.custom_completer_matcher",
                      "domain": null,
                      "role": "any",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " - pluggable completer with a default   implementation in "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "InteractiveShell",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "IPython.core.interactiveshell:InteractiveShell"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " which uses IPython hooks system   ("
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "complete_command",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ") with string dispatch (including regular expressions).   Differently to other matchers, "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "custom_completer_matcher"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " will not suppress   Jedi results to match behaviour in earlier IPython versions."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Custom matchers can be added by appending to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "IPCompleter.custom_matchers"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " list."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Matchers"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Simplifying some details, the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "Matcher"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " interface can described as"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "MatcherAPIv1 = Callable[[str], list[str]]\nMatcherAPIv2 = Callable[[CompletionContext], SimpleMatcherResult]\n\nMatcher = MatcherAPIv1 | MatcherAPIv2",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "MatcherAPIv1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " reflects the matcher API as available prior to IPython 8.6.0 and remains supported as a simplest way for generating completions. This is also currently the only API supported by the IPython hooks system "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "complete_command",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To distinguish between matcher versions "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "matcher_api_version"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " attribute is used. More precisely, the API allows to omit "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "matcher_api_version"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for v1 Matchers, and requires a literal "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for v2 Matchers."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Once the API stabilises future versions may relax the requirement for specifying "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "matcher_api_version"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " by switching to "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "functools.singledispatch",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "functools",
                "version": "*",
                "kind": "api",
                "path": "functools:singledispatch"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", therefore please do not rely on the presence of "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "matcher_api_version"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for any purposes."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Matcher API"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "By default results from all matchers are combined, in the order determined by their priority. Matchers can request to suppress results from subsequent matchers by setting "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "suppress"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "True"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " in the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "MatcherResult"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "When multiple matchers simultaneously request suppression, the results from of the matcher with higher priority will be returned."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Sometimes it is desirable to suppress most but not all other matchers; this can be achieved by adding a set of identifiers of matchers which should not be suppressed to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "MatcherResult"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " under "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "do_not_suppress"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " key."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The suppression behaviour can is user-configurable via "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "IPCompleter.suppress_competing_matchers",
              "domain": "std",
              "role": "configtrait",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Suppression of competing matchers"
        }
      ],
      "level": 1,
      "target": null
    }
  ],
  "local_refs": []
}