You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's consider following example (Python 2.7 with django) models.py
class Example(models.Model):
date=modelsDateTimeField(...)
other_file.py
from models import Example
"""some Example usage e.g."""
post_save.connect(my_function, sender=Example)
Let's say I I run 'show usages' on definition of Example class. (this line: class Example(models.Model)), the jedi-vim/jedi returns only the same line, there is no other_file.py usage shown.
For me it looks like that "show usages" functionality only works when there is direct import and only then jedi can find other usages (it works from other_file.py just fine).
This is a issue because it makes this functionality useless imo, it is more useful to run "grep -r" on whole project.
Manutentore messaggi: Vlad Sandrini <[email protected]>
"faults/listeners/pronto.py" 406L, 17799C
"faults/models/pronto.py" 820L, 21905C
"faults/signals.py" 67L, 3639C
"faults/models/pronto.py" 820 righe --0%--
"/tmp/vBYaEf4/5.fugitiveblame" 820L, 76025C
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Warning Too few public methods (0/2) (too-few-public-methods)
Warning Too few public methods (0/2) (too-few-public-methods)
"faults/models/pronto.py" 820L, 21905C scritti
Warning Too few public methods (0/2) (too-few-public-methods)
Warning Class has no __init__ method (no-init)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Warning Class has no __init__ method (no-init)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Error Instance of 'ForeignKey' has no 'pronto_id' member (no-member)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Warning Parameters differ from overridden 'save' method (arguments-differ)
Error Class 'Group' has no 'DoesNotExist' member (no-member)
Error Class 'Group' has no 'DoesNotExist' member (no-member)
Error Class 'Group' has no 'DoesNotExist' member (no-member)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
Warning Access to a protected member _meta of a client class (protected-access)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Warning Access to a protected member _meta of a client class (protected-access)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Warning Class has no __init__ method (no-init)
Error line too long (132 > 120 characters) (E501)
Warning Class has no __init__ method (no-init)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Warning Access to a protected member _meta of a client class (protected-access)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Warning Access to a protected member _meta of a client class (protected-access)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Warning Access to a protected member _meta of a client class (protected-access)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
Error Instance of 'ManyToManyField' has no 'filter' member (no-member)
"faults/models/pronto.py" 820L, 21905C scritti
Error line too long (132 > 120 characters) (E501)
Error line too long (132 > 120 characters) (E501)
Warning Class has no __init__ method (no-init)
Warning Class has no __init__ method (no-init)
Error line too long (132 > 120 characters) (E501)
Error line too long (132 > 120 characters) (E501)
Warning Class has no __init__ method (no-init)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Class has no __init__ method (no-init)
Error line too long (132 > 120 characters) (E501)
Error line too long (132 > 120 characters) (E501)
Error line too long (132 > 120 characters) (E501)
Error line too long (132 > 120 characters) (E501)
Warning Class has no __init__ method (no-init)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Class has no __init__ method (no-init)
Error line too long (132 > 120 characters) (E501)
Warning Class has no __init__ method (no-init)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Access to a protected member _meta of a client class (protected-access)
Warning Consider using ternary (u'...' if (self.rd_info[:97]) + (len(self.rd_info)) > 100 else u'') (consider-using-ternary)
"/tmp/vBYaEf4/9.fugitiveblame" 820L, 76025C
"faults/signals.py" 67 righe --1%--
"faults/signals.py" 67 righe --1%--
Warning Unused InformationRequest imported from faults.models (unused-import)
"faults/listeners/pronto.py" 406 righe --0%--
Warning Unused argument 'kwargs' (unused-argument)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Warning Unused argument 'kwargs' (unused-argument)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Warning Unused argument 'kwargs' (unused-argument)
Warning Unused argument 'kwargs' (unused-argument)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
Error local variable 'e' is assigned to but never used (F841)
"faults/signals.py" 67 righe --68%--
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
jedi-vim: Couldn't find any definitions for this.
"faults/models/__init__.py" 13L, 237C
"faults/models/pronto.py" 820 righe --50%--
"/tmp/vBYaEf4/19.fugitiveblame" 820L, 76025C
Issue
Let's consider following example (Python 2.7 with django)
models.py
other_file.py
Let's say I I run 'show usages' on definition of Example class. (this line: class Example(models.Model)), the jedi-vim/jedi returns only the same line, there is no other_file.py usage shown.
For me it looks like that "show usages" functionality only works when there is direct import and only then jedi can find other usages (it works from other_file.py just fine).
This is a issue because it makes this functionality useless imo, it is more useful to run "grep -r" on whole project.
Output of “:verbose JediDebugInfo”
Jedi-vim debug information
jedi-vim version
Global Python
Using Python version 3 to access Jedi.
3.6.7 (default, Oct 22 2018, 11:32:17), [GCC 8.2.0]
/usr/lib/python3.6/site.py
Jedi
/home/self/.vim/bundle/jedi-vim/pythonx/jedi/jedi/__init__.py
Jedi environment: <Environment: 2.7.14 in /home/self/virtualenvs/rp>
/home/self/virtualenvs/rp/lib/python2.7
/home/self/virtualenvs/rp/lib/python2.7/plat-x86_64-linux-gnu
/home/self/virtualenvs/rp/lib/python2.7/lib-tk
/home/self/virtualenvs/rp/lib/python2.7/lib-old
/home/self/virtualenvs/rp/lib/python2.7/lib-dynload
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/easyaccept-0.4.1-py2.7.egg
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/suds_requests-0.3-py2.7.egg
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/rep_sharenet-1.0.4-py2.7.egg
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/rep_api-0.2.2-py2.7.egg
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/requests-2.19.1-py2.7.egg
/home/self/virtualenvs/rp/local/lib/python2.7/site-packages/dbgp-1.1-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages
/home/self/virtualenvs/rp/lib/python2.7/site-packages/easyaccept-0.4.1-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages/suds_requests-0.3-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages/rep_sharenet-1.0.4-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages/rep_api-0.2.2-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages/requests-2.19.1-py2.7.egg
/home/self/virtualenvs/rp/lib/python2.7/site-packages/dbgp-1.1-py2.7.egg
Known environments
<Environment: 2.7.14 in /home/self/virtualenvs/rp> (/home/self/virtualenvs/rp/bin/python)
<Environment: 3.6.7 in /usr> (/usr/bin/python3.6)
<Environment: 3.5.3 in /usr> (/usr/bin/python3.5)
<Environment: 2.7.14 in /home/self/virtualenvs/rp> (/home/self/virtualenvs/rp/bin/python2.7)
Settings
:version
:messages
:scriptnames
The text was updated successfully, but these errors were encountered: