Skip to content

Plugin behaviour dependent on third-party module version? #3813

Closed
@jstasiak

Description

@jstasiak

I was looking at mypy plugin infrastructure the other day and I wondered what's the solution to the following issue (let's assume we have a third party module supermod):

  • supermod version 1.1 has function superfun returning types X or Z, depending on some parameter
  • supermod version 1.2 has function superfun returning types Y or W, depending on some parameter
  • I'd like to have a mypy plugin that can handle both of those versions correctly

In order to do that a plugin would have to be able to inspect version of supermod installed I think... Alternatively the version could be provided in per-plugin options, like #3532 describes. What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-pluginsThe plugin API and ideas for new plugins

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions