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

mypy type hints #143

Open
dacevedo12 opened this issue Sep 19, 2024 · 4 comments
Open

mypy type hints #143

dacevedo12 opened this issue Sep 19, 2024 · 4 comments

Comments

@dacevedo12
Copy link

dacevedo12 commented Sep 19, 2024

would be nice to have type hints added to the library

mypy currently complains due to univers: module is installed, but missing library stubs or py.typed marker

https://peps.python.org/pep-0484/
https://peps.python.org/pep-0561/

@TG1999
Copy link
Contributor

TG1999 commented Sep 19, 2024

@dacevedo12 thanks for bringing this to our attention. We will look into this.

@pombredanne
Copy link
Member

@dacevedo12 a patch would be mucho welcomed!
Would you also be working on a vers implementation in Go at https://github.com/fluidattacks/compare_version/ ?

vers is at package-url/purl-spec#139

@dacevedo12
Copy link
Author

dacevedo12 commented Sep 24, 2024

Hi @pombredanne

regarding vers, not really, the project you linked was a workaround attempt.

we needed a universal version comparison solution that could be called from python code, but hadn't yet discovered this great library so we were hacking around subprocess calls to that go cli

@drestrepom

@pombredanne
Copy link
Member

@dacevedo12 if you can help with mypy'ing the code this would be awesome!
FWIW, Google also use univers in OSV https://github.com/google/osv.dev/tree/master/osv/third_party/univers

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

3 participants