pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ipython/ipython/pull/15159/files

" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-c22301b4e838281c.css" /> chore: add 5 return type hints in completer.py by travellingsoldier85 · Pull Request #15159 · ipython/ipython · GitHub
Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions IPython/core/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ def _auto_import(self):
return self._auto_import_func


def get__all__entries(obj):
def get__all__entries(obj) -> list:
"""returns the strings in the __all__ attribute"""
try:
words = getattr(obj, '__all__')
Expand Down Expand Up @@ -1519,7 +1519,7 @@ def match_dict_keys(
)
text_serializable_types = (str, bytes, int, float, slice)

def filter_prefix_tuple(key):
def filter_prefix_tuple(key) -> bool:
# Reject too short keys
if len(key) <= prefix_tuple_size:
return False
Expand Down Expand Up @@ -2383,7 +2383,7 @@ def magic_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
bare_text = text.lstrip(pre)
global_matches = self.global_matches(bare_text)
if not explicit_magic:
def matches(magic):
def matches(magic) -> tuple:
"""
Filter magics, in particular remove magics that match
a name present in global namespace.
Expand Down Expand Up @@ -2900,7 +2900,7 @@ def python_func_kw_matcher(self, context: CompletionContext) -> SimpleMatcherRes
matches = self.python_func_kw_matches(context.token)
return _convert_matcher_v1_result_to_v2_no_no(matches, type="param")

def python_func_kw_matches(self, text):
def python_func_kw_matches(self, text) -> list:
"""Match named parameters (kwargs) of the last open function.

.. deprecated:: 8.6
Expand Down Expand Up @@ -3213,7 +3213,7 @@ def custom_completer_matcher(self, context):
result["do_not_suppress"] = {_get_matcher_id(self._jedi_matcher)}
return result

def dispatch_custom_completer(self, text):
def dispatch_custom_completer(self, text) -> list:
"""
.. deprecated:: 8.6
You can use :meth:`custom_completer_matcher` instead.
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy