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

[Python] Setup type checking with mypy #24376

Open
asfimport opened this issue Mar 20, 2020 · 4 comments
Open

[Python] Setup type checking with mypy #24376

asfimport opened this issue Mar 20, 2020 · 4 comments

Comments

@asfimport
Copy link
Collaborator

Get mypy checks running, activate things like check_untyped_defs later.

Reporter: Uwe Korn / @xhochy

PRs and other links:

Note: This issue was originally created as ARROW-8175. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Todd Farmer / @toddfarmer:
This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.

@asfimport
Copy link
Collaborator Author

Kyle Barron:
Working with pyarrow in e.g. vscode is really painful at the moment because of the lack of user-facing types. vscode can access the top-level functions, but then as soon as you create a class, it becomes Any.

import pyarrow.parquet as pq
table = pq.read_table()
table # <-- Any
table. # <-- no auto completions

This may be a slightly different ask than the title of this ticket, as I'm referring to the developer experience while writing the code, not checking code. I can create a separate ticket if desired.

For now, I may create my own third-party type hints for this using mypy's stubgen

@groceryheist
Copy link

Note that this isn't specific to VSCode. For example, I got here after having this issue in emacs. The feature request is to provide a "stubs" package e.g., https://github.com/pandas-dev/pandas-stubs

@ion-elgreco
Copy link

Why doesn't pyarrow use any static type hints? This seems very strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants