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

Fix mypy tests on 3.10 #771

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Fix mypy tests on 3.10 #771

merged 1 commit into from
Jun 14, 2021

Conversation

euresti
Copy link
Contributor

@euresti euresti commented Feb 25, 2021

Looks like this was a bug fixed upstream
Fixes #767

Pull Request Check List

This is just a friendly reminder about the most common mistakes. Please make sure that you tick all boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing left to do. If your pull request is a documentation fix or a trivial typo, feel free to delete the whole thing.

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
    • ...and used in the stub test file tests/typing_example.py.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • Changes to the signature of @attr.s() have to be added by hand too.
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in our __init__.py file.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

@euresti
Copy link
Contributor Author

euresti commented Feb 25, 2021

Why didn't that work? I'm gonna have to install Python 3.10 I guess. Sigh.

@euresti
Copy link
Contributor Author

euresti commented Feb 25, 2021

Oh it looks like python/typeshed#5044 hasn't been included with mypy yet. We might have to wait for another mypy release.

@hynek
Copy link
Member

hynek commented Jun 14, 2021

Great news! 3.10 is passing!

Bad news! Everything else is broken! 😂

We've already noticed it in #824 that test_mypy seems to be broken now in CI. Did they merge something you needed?

@hynek hynek mentioned this pull request Jun 14, 2021
10 tasks
@euresti
Copy link
Contributor Author

euresti commented Jun 14, 2021

Looks like single quote went to double quote:

  E:      ...te: Revealed type is 'def (b: Any, a: Any) -> main.A'
  E:      ...te: Revealed type is "def (b: Any, a: Any) -> main.A"

Let me see what caused it and fix it.

@euresti
Copy link
Contributor Author

euresti commented Jun 14, 2021

Here's what prompted the change: python/mypy#7445
Here's the change:python/mypy#10525

Ok I'll just change our tests to use double quotes.

@euresti
Copy link
Contributor Author

euresti commented Jun 14, 2021

Should we pin a mypy version in tox.ini?

@hynek
Copy link
Member

hynek commented Jun 14, 2021

Should we pin a mypy version in tox.ini?

Unless it’s necessary, rather not? We want to learn about breakage ASAP.

Or do you mean it as a temporary fix? On a phone rn so can’t fully investigate the MyPy issues.

@euresti
Copy link
Contributor Author

euresti commented Jun 14, 2021

Fix is here: #825
As long as we think keeping up with mypy is worth the sometimes build failures then we can keep things as is.

@euresti euresti marked this pull request as ready for review June 14, 2021 17:39
@euresti
Copy link
Contributor Author

euresti commented Jun 14, 2021

I think one of the merges killed my diff. Hang on.

Looks like this was a bug fixed upstream
Copy link
Member

@hynek hynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

since you didn’t change any code, I assume codecov is just being difficult.

@hynek hynek merged commit fb15487 into python-attrs:main Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_mypy.yml fails hilariously on Python 3.10
2 participants