-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versions > 0.13 no longer provide autocompletions for nested submodules #995
Comments
Thanks for the good report! Is there a way you can paste the output if you complete for both (0.13 and 0.16) after |
Hopefully this is what you mean. 0.13.3 - worksJedi-vim debug informationjedi-vim version
Global PythonUsing Python version 3 to access Jedi.
Jedi
Jedi environment: <SameEnvironment: 3.6.10 in /Users/nate.rodd/.pyenv/versions/3.6.10>
Known environmentsdbg: Start environment subprocess '/Users/nate.rodd/.pyenv/shims/python3.8'
Settings
:version
:messages
omnifunc=jedi#completions
NVIM v0.4.3 Features: +acl +iconv +tui system vimrc file: "$VIM/sysinit.vim" Run :checkhealth for more info
dbg: execute result: S{Callable(Callable[S{<SequenceLiteralValue of PythonNode(atom, [<Operator: [>, <Name: _C@210,15>, <Operator: ]>])>}, S{<ClassValue: <Class: type@89-123>>}])} in <FunctionValue: <Function: propify@45-49>>
1: ~/.config/nvim/init.vim |
Can you upgrade Jedi to the master branch and retry? It might be because of a49c757b8ad70833aad231294ababa161cffe26c in Jedi. (which was fixed after 0.16). |
Can you run
in Python CLI for Jedi 0.16.0? The debug output is too big for VIM :). |
This did not help
|
My bad, I actually wanted |
|
My suspicion is that this doesn't work for you, because Jedi now understands My guess is that this is not a bug, but just something where you type in ways that Jedi cannot deal with. |
That's interesting, I wonder if Jedi does not play well with attrs anymore due to the typing enhancement? Propify is basically just a wrapper for attr.s with specific args: def propify(cls):
cls._propify = True
cls = attr.s(cls, auto_attribs=True, kw_only=True)
return cls prop() is just a wrapper for attr.ib with some extra metatdata fields. @propify
class Target(Object):
class ObjectType(Enum):
ACL = "acl"
FIREWALL = "firewall"
POLICY = "policy"
ZONE_TO_ZONE = "zone_to_zone"
at_type: AtType = prop(AtType.OBJECT, key=Object.Prop.AT_TYPE.value)
type: ObjectType = prop(
ObjectType.FIREWALL, key=Object.Prop.OBJECT_TYPE.value, cmp=False, repr=False
) |
The problem is that attrs is typed as One way to deal with it is something like
This should probably at least work, but I'm not sure they'd accept this change. You can find a discussion about decorators here: python/mypy#3157. It's not a Jedi/jedi-vim issue. |
@davidhalter is this from typeshed? |
Yes this is from typeshed. |
Issue
After upgrading from Jedi 0.13.3 I am no longer getting full autocompletion. It seems like autocompletion doesn't work at all for anything inside submodules.
For example, on version 0.16, I get completions for a module class.
but I get nothing for a class in a submodule
If I downgrade to jedi 0.13.3, I get the autocompletions I'd expect
Steps to reproduce
Output of “:verbose JediDebugInfo”
Jedi-vim debug information
jedi-vim version
Global Python
Using Python version 3 to access Jedi.
/Users/blah/.pyenv/versions/3.6.10/bin/python3
3.6.10 (default, Jan 30 2020, 13:26:11), [GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.17)]
/Users/blah/.pyenv/versions/3.6.10/lib/python3.6/site.py
Jedi
/Users/blah/.config/nvim/plugged/jedi-vim/pythonx/jedi/jedi/__init__.py
Jedi environment: <SameEnvironment: 3.6.10 in /Users/blah/.pyenv/versions/3.6.10>
/Users/blah/.pyenv/versions/3.6.10/lib/python36.zip
/Users/blah/.pyenv/versions/3.6.10/lib/python3.6
/Users/blah/.pyenv/versions/3.6.10/lib/python3.6/lib-dynload
/Users/blah/.pyenv/versions/3.6.10/lib/python3.6/site-packages
Known environments
<Environment: 3.6.10 in /Users/blah/.pyenv/versions/3.6.10> (/Users/nate.rodd/.pyenv/versions/3.6.10/bin/python3.6)
<Environment: 2.7.16 in /System/Library/Frameworks/Python.framework/Versions/2.7> (/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python)
Settings
:version
:messages
:scriptnames
The text was updated successfully, but these errors were encountered: