question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`py.typed` not getting distributed

See original GitHub issue

It seems that the py.typed file is not getting distributed, so mypy is not recognizing installed rich-click as being typed. I think you need to explicitly add it to package_data (options.package_data in setup.cfg).

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
zmooncommented, Jun 21, 2022

For posterity, I was eventually able to reproduce locally #75 being the solution. Interestingly, package_data={"rich-click": ["py.typed"]} in setup.py silently fails to add py.typed, while rich-click = py.typed in setup.cfg’s [options.package_data] automatically does the conversion to rich_click (though giving a warning) and does add the py.typed.

1reaction
ewelscommented, Jun 21, 2022

(type checking? ok, it was tenuous…)

Read more comments on GitHub >

github_iconTop Results From Across the Web

My Python multi-module package won't distribute with a py ...
However when I distribute the package, it doesn't include any of the py.typed files. I have no idea why this is, and it's...
Read more >
PEP 561 – Distributing and Packaging Type Information
However, there is no standard method to distribute packages with type information. Also, if one wished to ship stub files privately the only ......
Read more >
Missing py.typed declaration? #193 - encode/httpx - GitHub
mypy is complaining about not being able to find type annotations for httpx : error: Cannot find module named 'httpx'.
Read more >
Don't forget `py.typed` for your typed Python package
It's faily simple to include this file: just touch a py.typed file in your package directory and include it in your distribution.
Read more >
packaging python typed code (intermediate) anthony explains ...
today I talk about how to package up typed code -- either inline types or typing stubs and distribute it via pypi!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found