Skip to content
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

Version 1.1.299 introduces bug when using pyxlsb.workbook.Workbook #4810

Closed
Dr-Irv opened this issue Mar 20, 2023 · 4 comments
Closed

Version 1.1.299 introduces bug when using pyxlsb.workbook.Workbook #4810

Dr-Irv opened this issue Mar 20, 2023 · 4 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@Dr-Irv
Copy link

Dr-Irv commented Mar 20, 2023

Describe the bug
If using pyxlsb.workbook.Workbook, it finds the class with pyright 1.1.298, but not 1.1.299

To Reproduce

import pyxlsb.workbook


def foo(x: pyxlsb.workbook.Workbook):
    pass

with 1.1.299, get error:

pyright 1.1.299
pyxlsbworkbook.py
  pyxlsbworkbook.py:4:28 - error: "Workbook" is not a known member of module "pyxlsb.workbook" (reportGeneralTypeIssues)

With 1.1.298, get no error.

Expected behavior
No error.

VS Code extension or command-line
command line pyright

Additional context

Uses pyxlsb version 1.0.10

This got picked up by running pyright on pandas-stubs

@erictraut
Copy link
Collaborator

I'm not able to repro the problem. Perhaps you have something else installed in your venv (e.g. a stub library) that is interfering with the type evaluation. Are you able to repro with a clean venv?

@erictraut erictraut added the question Further information is requested label Mar 21, 2023
@erictraut
Copy link
Collaborator

I was just able to get a repro for this. Seems to be intermittent, which is why I didn't see it initially. Will investigate further.

@erictraut erictraut added bug Something isn't working and removed question Further information is requested labels Mar 21, 2023
erictraut pushed a commit that referenced this issue Mar 21, 2023
…n a multi-part import statement was used and `useLibraryCodeForTypes` was disabled. This addresses #4810.
@erictraut
Copy link
Collaborator

Thanks for the bug report. This will be addressed in the next release. There were a couple of issues that contributed to this bug. It manifest only for import statements with multipart module names and only if useLibraryCodeForTypes was disabled.

@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Mar 21, 2023
@erictraut
Copy link
Collaborator

This is included in pyright 1.1.300, which I just published. It will also be included in a future release of pylance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants