Skip to content

Python curses module on Windows is never allowed to autocomplete #2763

@lapraswastaken

Description

@lapraswastaken

Environment data

  • Language Server version: 2022.4.3
  • OS and version: Windows 10 Home, 21H2
  • Python version): 3.10.2

Expected behavior

Autocompletion for the curses module should work on Windows, to support libraries like windows-curses.

Actual behavior

Autocompletion for the curses module doesn't work.

Code Snippet / Additional information

This can be replicated simply by importing the curses module and typing a dot after it:

image

After ctrl+clicking the curses import to get to its __init__.py file, there are multiple problems telling me that things aren't defined:

image
image

After ctrl+clicking the _curses import at the top of the init file, I see that anything in the curses module is only defined if sys.platform is not Windows:

image

I've installed windows-curses via pip and everything runs as it should, but I can't get autocompletion without removing the conditional.

Metadata

Metadata

Assignees

Labels

fixed in next version (pyright)A fix has been implemented and will appear in an upcoming versionskip-reassignOptional label that tells the issue automation bot to not reassign the owner

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions