Add option to ignore `*` and `1 in types · Issue #45 · typeddjango/pytest-mypy-plugins · GitHub
Skip to content

Add option to ignore * and `1 in types #45

Open

Description

@sobolevn

There are cases when some types are revealed like:

# N: Revealed type is 'builtins.bool*'

Or like so:

reveal_type(dekind(container))  # N: Revealed type is 'main.IO[def (_ValueType`1) -> _NewValueType`-1]'

Here are the problems with these two things:

  1. They can change! Sometimes if you use a different technique inside your type, you will loose this * while everything else will work the exact same way
  2. Different versions of python in different environments might produce different numeric results after
`

char in type vars.

So, I propose to add strict: false parameter to our test cases to ignore these chars (and possibly other things in the future).

Activity

  1. sobolevn commented on Oct 20, 2020

    @sobolevn
    MemberAuthor

    I like strict_assert: false more. And probably we would also need a command line flag: --mypy-strict-assert

  2. brunns commented on Aug 9, 2021

    @brunns
    Contributor

    PR #55 might cover this use case, though in a different way. Thoughts?

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions