Skip to content

Commit

Permalink
Allow safe access to the __getattribute__ method of modules
Browse files Browse the repository at this point in the history
This restores code completions of second-level modules when Jedi
completions are disabled.
  • Loading branch information
ccordoba12 committed Apr 22, 2023
1 parent 47d043e commit 2ba5903
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions IPython/core/guarded_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ def _list_methods(cls, source=None):

dict_keys: Type[collections.abc.KeysView] = type({}.keys())
method_descriptor: Any = type(list.copy)
module = type(builtins)

NUMERICS = {int, float, complex}

Expand Down Expand Up @@ -686,6 +687,7 @@ def _list_methods(cls, source=None):
*NUMERICS,
dict_keys,
method_descriptor,
module
}


Expand Down

0 comments on commit 2ba5903

Please sign in to comment.