Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Plugin hook for preprocessing annotations #7758

Description

@jtrakk

I want to add some custom annotations on my variables. For example,

def idiv(left: int, right: int | right != 0) -> int:
    return left // right

Mypy accepts only PEP 484 type hints, so I'd like to provide a plugin to pre-process this annotation and return a PEP 484-compatible hint before Mypy checks it. Could Mypy provide a preprocessing hook for such transformations?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions