Skip to content

Module "semver" does not explicitly export attribute "Version" #410

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

Closed
Soneji opened this issue Jun 13, 2023 · 4 comments
Closed

Module "semver" does not explicitly export attribute "Version" #410

Soneji opened this issue Jun 13, 2023 · 4 comments
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Release_3.x.y Only for the major release 3

Comments

@Soneji
Copy link
Contributor

Soneji commented Jun 13, 2023

Hi

I am running mypy the python static type checker in my project with the --strict flag and it is causing an error.

Module "semver" does not explicitly export attribute "Version"

I have replicated the error in this repl environment online
https://replit.com/@soneji/semver-mypy

You can click "show code" to see the code but I have printed it also

I have followed the usage instructions in the documentation so I am unsure why this error is being caused

@tomschr
Copy link
Member

tomschr commented Jun 13, 2023

Thank you @Soneji for your contribution. Much appreciated! 👍

Seems this is caused by a missing __all__ variable.

It's strange that mypy doesn't detect it. When I run tox -e mypy this error doesn't show up.

@tomschr tomschr added Release_3.x.y Only for the major release 3 Bug Error, flaw or fault to produce incorrect or unexpected results labels Jun 13, 2023
@Soneji
Copy link
Contributor Author

Soneji commented Jun 13, 2023

Cool!

Happy to submit a PR, do you think you could publish a fixed version of the package after this?

I notice you added some release tags to this issue, are you waiting on a particular set of features before publishing a new release?

@Soneji
Copy link
Contributor Author

Soneji commented Jun 13, 2023

Maybe you need strict mode for mypy to detect it?

@tomschr
Copy link
Member

tomschr commented Jun 13, 2023

Happy to submit a PR, do you think you could publish a fixed version of the package after this?

Please do! Happy to include it.

I notice you added some release tags to this issue, are you waiting on a particular set of features before publishing a new release?

That's just so I can find them. Nothing special to it. 😉
I can release a 3.1.0 (or 3.0.1) version if you need it.

Maybe you need strict mode for mypy to detect it?

That was my suspicion as well. I've tried the --strict option and it indeed found some issues. However, from what I could see, they are all unrelated to this specific issue.

Soneji added a commit to Soneji/python-semver that referenced this issue Jun 14, 2023
Soneji added a commit to Soneji/python-semver that referenced this issue Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Release_3.x.y Only for the major release 3
Projects
None yet
Development

No branches or pull requests

2 participants