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

Incompatibility between pydrake and Mypy #18580

Closed
jwnimmer-tri opened this issue Jan 12, 2023 · 1 comment · Fixed by #18674
Closed

Incompatibility between pydrake and Mypy #18580

jwnimmer-tri opened this issue Jan 12, 2023 · 1 comment · Fixed by #18674
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters configuration: python priority: medium

Comments

@jwnimmer-tri
Copy link
Collaborator

See #16987 for some background.

In our pydrake releases, we install *.pyi files so that people who use VSCode will have auto-complete enabled.

However, our *.pyi files are currently malformed in several ways, which means that if someone tries to run mypy type checking with pydrake in the loop, it will error out with syntax errors.

The work-around for the moment is to delete the *.pyi files if you intent to use mypy.

(Details to follow.)

@jwnimmer-tri jwnimmer-tri added priority: medium configuration: python component: build system Bazel, CMake, dependencies, memory checkers, linters labels Jan 12, 2023
@jwnimmer-tri jwnimmer-tri self-assigned this Jan 12, 2023
@jwnimmer-tri
Copy link
Collaborator Author

Here's a tip from a user who found another work-around: if you move the *.pyi files out of your venv and into a typings directory, apparently VSCode will still find them there, but it won't confuse Mypy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters configuration: python priority: medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant