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

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

Open
oliverdain opened this issue May 7, 2024 · 4 comments
Open

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

oliverdain opened this issue May 7, 2024 · 4 comments
Assignees
Labels
bug Something isn't working contributor

Comments

@oliverdain
Copy link

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
@oliverdain oliverdain added bug Something isn't working contributor labels May 7, 2024
@N-o-Z
Copy link
Member

N-o-Z commented May 9, 2024

@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
Copy link
Author

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
Copy link
Member

N-o-Z commented May 9, 2024

@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
Copy link
Author

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

re-opening as suggested.

@oliverdain oliverdain reopened this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributor
Projects
None yet
Development

No branches or pull requests

2 participants