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

py.typed missing while code does have type hints #977

Closed
akaihola opened this issue Oct 20, 2024 · 1 comment
Closed

py.typed missing while code does have type hints #977

akaihola opened this issue Oct 20, 2024 · 1 comment

Comments

@akaihola
Copy link

The pyupgrade code base is thoroughly type hinted, but type checkers like Mypy disregard the hints since the py.typed marker file is missing (see Packaging Type Information in the Static Typing with Python guide).


Note:
I am aware that pyupgrade doesn't provide a public Python API and thus this really doesn't matter. Nevertheless, I'm experimenting with supporting pyupgrade as a code formatting backend for Darker, and calling it directly in Python instead of as a subprocess gives a nice speed-up (see akaihola/darker#755). I will of course consider the options (subprocess vs. private Python API with extra checks and guardrails like I've done with Black) before releasing this feature.

@akaihola akaihola changed the title py.typed missing while code has type hints py.typed missing while code does have type hints Oct 20, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 20, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 20, 2024
@asottile
Copy link
Owner

there is no public API

akaihola added a commit to akaihola/darker that referenced this issue Oct 20, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 21, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 21, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 21, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 28, 2024
akaihola added a commit to akaihola/darker that referenced this issue Oct 29, 2024
akaihola added a commit to akaihola/darker that referenced this issue Dec 31, 2024
akaihola added a commit to akaihola/darker that referenced this issue Jan 1, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 1, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 1, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 1, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 2, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 3, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 3, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 7, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 7, 2025
akaihola added a commit to akaihola/darker that referenced this issue Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants