Unable to goto definitions in __init__.py
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript, python
- Domaine
- developer-experience, tooling
Piste de recherche
Reproduisez le problème avec foo/init.py, foo/bar.py et foo/baz.py, puis comparez le comportement d’accès à la définition d’Atom avec les appels à jedi.Script.goto indiqués. Commencez par le point d’entrée d’intégration qui gère les définitions pour les imports Python. Le travail est terminé lorsque la sélection de test dans foo/bar.py ouvre foo/init.py, tandis que test2 continue d’ouvrir foo/baz.py.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Here is my reproduction project:
fjompo@grande repro$ find .
.
./foo
./foo/__init__.py
./foo/bar.py
./foo/baz.py
fjompo@grande repro$ cat foo/__init__.py
test = 5
fjompo@grande repro$ cat foo/bar.py
from . import test
from .baz import test2
print(test)
print(test2)
fjompo@grande repro$ cat foo/baz.py
test2 = 42
fjompo@grande repro$ python -m foo.bar
5
42
If i go to foo/bar.py and highlight test2, then go-to-definition works, but for test it does not. It simply yields "Sorry, no definitions found."
This is likely not an issue with jedi, as shown here:
>>> import jedi
>>> jedi.Script(None, path="foo/bar.py").goto(line=3, column=7, follow_imports=True)[0].module_path
PosixPath('/home/fjompo/tmp/repro/foo/__init__.py')
>>> jedi.Script(None, path="foo/bar.py").goto(line=4, column=7, follow_imports=True)[0].module_path
PosixPath('/home/fjompo/tmp/repro/foo/baz.py')
Here are the project files: repro.zip
- Langage dominant
- JavaScript
- Étoiles
- 238
- Forks
- 41
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de atom-community/ide-python
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
atom-community/ide-python#575 · 5 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
atom-community/ide-python#570 · 2 commentaires · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
atom-community/ide-python#568 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
atom-community/ide-python#567 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
atom-community/ide-python#566 ·
Toutes les issues de atom-community/ide-python
Issues similaires
-
Update HugeIcons library Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
antfu-collective/icones#398 ·
-
ECmail.com Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
wesbos/burner-email-providers#554 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
components-web-app/docs#92 ·