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

gurobipy_pandas methods are not exported for pyright type checker #73

Closed
Dr-Irv opened this issue May 17, 2024 · 2 comments · Fixed by #75
Closed

gurobipy_pandas methods are not exported for pyright type checker #73

Dr-Irv opened this issue May 17, 2024 · 2 comments · Fixed by #75
Labels
bug Something isn't working

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented May 17, 2024

See the pic of using pylance/pyright in VS Code:
image

In gurobipy_pandas/__init__.py, if I change to this line:

from gurobipy_pandas.api import add_vars as add_vars # noqa: F401

Then the error goes away.

@simonbowly
Copy link
Member

I can't reproduce the issue in my vscode or running pyright manually (pyright 1.1.363) but would prefer to fix it by defining:

__all__ = ["add_vars", "add_constrs", "set_interactive"]

as the redundancy seems really odd to me. According to pyright's docs this should also do the trick.

@simonbowly simonbowly added the bug Something isn't working label May 19, 2024
simonbowly added a commit that referenced this issue May 20, 2024
@simonbowly
Copy link
Member

This fix is released with version 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants