Skip to content
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

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

Open
sobolevn opened this issue Oct 20, 2020 · 2 comments
Open

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

sobolevn opened this issue Oct 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@sobolevn
Copy link
Member

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).

@sobolevn sobolevn added the enhancement New feature or request label Oct 20, 2020
@sobolevn
Copy link
Member Author

sobolevn commented Oct 20, 2020

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

@brunns
Copy link
Contributor

brunns commented Aug 9, 2021

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
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants