treeverse / lakeFS

lakeFS - Data version control for your data lake | Git for data
https://docs.lakefs.io
Apache License 2.0
4.46k stars 359 forks source link

[Bug]: Python library is missing a py.typed file #7737

Open oliverdain opened 6 months ago

oliverdain commented 6 months ago

What happened?

The Python library installed via pip install lakefs does appear to have type hints. However, mypy won't use them unless there's a py.typed file in the package. As such mypy won't type check any code that uses lakefs.

Expected behavior

It has a py.typed file and mypy will use the type hints.

lakeFS version

0.6.0

How lakeFS is installed

pip install lakefs

Affected clients

Python lakefs client 0.6.0

Relevant log output

Skipping analyzing "lakefs": module is installed, but missing library stubs or py.typed marker


### Contact details

oliver@companionprofessional.com
N-o-Z commented 6 months ago

@oliverdain thanks for opening the issue.

Can you please explain what you want to achieve from this issue? Although we provide type hints, we do not have a strict typing enforcement in this package, which means the running mypy on a code that uses this package will result in a lot of errors.

oliverdain commented 6 months ago

Can you please explain what you want to achieve from this issue?

I was hoping to be able to run mypy over my code and have it check my usage of your API.

Although we provide type hints, we do not have a strict typing enforcement in this package

I only took a quick look and things looked typed so I thought you were just missing a py.typed file and everything would work. If your typing is only partial then, yes, adding a py.typed probably creates more problems than it solves.

Happy to close this. Would be great if you someday added full type hinting and a py.typed but that's clearly a much bigger lift than just adding a marker file.

N-o-Z commented 6 months ago

@oliverdain Thanks, You can leave the issue open if you want so we can track it, but as you said this is probably not something that will be prioritized in the near future. Having said that, we are always happy to receive new contributions from the community :)

oliverdain commented 6 months ago

You can leave the issue open if you want so we can track it

re-opening as suggested.