Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

No completion in namespace packages #12

Closed
MikhailArkhipov opened this issue Aug 31, 2018 · 3 comments
Closed

No completion in namespace packages #12

MikhailArkhipov opened this issue Aug 31, 2018 · 3 comments
Assignees
Labels
bug Something isn't working feature: intellisense
Milestone

Comments

@MikhailArkhipov
Copy link

.
├── projecta
│   └── foo
│       ├── bar
│       │   └── __init__.py
│       └── __init__.py
└── projectb
    └── foo
        ├── baz
        │   └── __init__.py
        └── __init__.py

test.py:

import projectA.foo
import projectA.foo.bar
import projectB.foo
import projectB.foo.baz

projectA.

image

Jedi:
image

PyCharm:
image

@mchampanis
Copy link

i've also come across this:

  1. my own namespace package; completion started working when i added a blank __init__.py
  2. using the google.cloud packages; no __init__.py so no completion (e.g. https://pypi.org/project/google-cloud-bigquery/)

@gramster gramster added this to the Nov 2018.1 milestone Oct 24, 2018
@MikhailArkhipov MikhailArkhipov modified the milestones: Nov 2018.1, Nov 2018.2 Nov 6, 2018
AlexanderSher added a commit to AlexanderSher/python-language-server that referenced this issue Nov 17, 2018
- Fixed namespace package resolution in completions (microsoft#12)
- Fixed support for sys.modules (microsoft#363)
- Added several tests (microsoft#365)
- Fixed support for implicit relative module names (microsoft#366)
- Added support for multiple matching rules in PathResolver (microsoft#367)

Not yet implemented:
- Fix imports of binary modules (microsoft#362)
- Fix stubs handling
- AstAnalysisWalker
- More tests
- Code cleanup
@rafales
Copy link

rafales commented Nov 27, 2018

I'm running into the same problem. I'm using "native" namespace packages (as defined in PEP-0420, without init.py).

I've set up project structure according to this example: https://github.com/pypa/sample-namespace-packages/tree/master/native

I have installed those packages in virtualenv via pip install -e.

@MikhailArkhipov
Copy link
Author

#361

jakebailey pushed a commit to jakebailey/python-language-server that referenced this issue Nov 1, 2019
- Fixed namespace package resolution in completions (microsoft#12)
- Fixed support for sys.modules (microsoft#363)
- Added several tests (microsoft#365)
- Fixed support for implicit relative module names (microsoft#366)
- Added support for multiple matching rules in PathResolver (microsoft#367)

Not yet implemented:
- Fix imports of binary modules (microsoft#362)
- Fix stubs handling
- AstAnalysisWalker
- More tests
- Code cleanup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature: intellisense
Projects
None yet
Development

No branches or pull requests

5 participants