← 输入框|github.com|刷新
Skip to content

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

Closed

Description

@Soneji

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

Activity

  1. tomschr commented on Jun 13, 2023

    @tomschr
    Member

    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.

  2. added
    Release_3.x.y
    Bug
    on Jun 13, 2023
  3. Soneji commented on Jun 13, 2023

    @Soneji
    ContributorAuthor

    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?

  4. Soneji commented on Jun 13, 2023

    @Soneji
    ContributorAuthor

    Maybe you need strict mode for mypy to detect it?

  5. tomschr commented on Jun 13, 2023

    @tomschr
    Member

    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.

  6. added 2 commits that reference this issue on Jun 14, 2023
    cbce372
    91585d4
  7. added a commit that references this issue on Sep 26, 2024
    17bc257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugRelease_3.x.y

    Type

    No type

    Fields

    SIze

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions