returns icon indicating copy to clipboard operation
returns copied to clipboard

Update plugin to support mypy 1.16.0

Open Jazzinghen opened this issue 7 months ago • 4 comments

I have made things!

Checklist

  • [x] I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • [x] I have created at least one test case for the changes I have made
  • [ ] I have updated the documentation for the changes I have made
  • [ ] I have added my changes to the CHANGELOG.md

Related issues

Closes #2148

I have not updated the readme as there is no strict reference to the supported mypy version, and it looks like the changelog contains release info, so I didn't touch that one either.

All the checks passed, even though I had to add an ignore flag in a function that was using some strange trait-based property access.

I used a solution very similar to the one used in https://github.com/typeddjango/django-stubs/pull/2670 but I get the version info using importlib instead of the string in the module.

Jazzinghen avatar May 30 '25 07:05 Jazzinghen

This is strange. I haven't seen these issues on my side. :thinking:

Jazzinghen avatar Jun 02 '25 02:06 Jazzinghen

Oh? I didn't notice. I think I might have just ran poetry update -U to get the latest version of Mypy and that updated everything in the lock file. Should I change the entry in pyproject.toml to limit the version to 1.0?

Jazzinghen avatar Jun 02 '25 10:06 Jazzinghen

yes, please :)

sobolevn avatar Jun 02 '25 11:06 sobolevn

Rebased against master and pinned version

Jazzinghen avatar Jun 03 '25 01:06 Jazzinghen

@sobolevn @Jazzinghen are there any plans to continue work on this PR?

svorcan-rho avatar Jul 15 '25 21:07 svorcan-rho

@svorcan-rho today [email protected] was released :) Any help is appreciated.

sobolevn avatar Jul 15 '25 21:07 sobolevn

@sobolevn @Jazzinghen are there any plans to continue work on this PR?

I was waiting for approval after my last commit. Was there something missing?

Jazzinghen avatar Jul 16 '25 00:07 Jazzinghen

the CI is still red, I would be happy to approve it after it is green :)

sobolevn avatar Jul 16 '25 07:07 sobolevn

the CI is still red, I would be happy to approve it after it is green :)

A lot of errors seem to be not very related to what I did, however I'll try to fix them. They're quite a lot, I hope I won't break anything.

Jazzinghen avatar Jul 22 '25 04:07 Jazzinghen

Please, run poetry update to fix the ci :)

sobolevn avatar Jul 22 '25 08:07 sobolevn

I guess this PR became more of a "Update all the tests to run with the newer Mypy" than just that small change I did, haha

Jazzinghen avatar Jul 22 '25 09:07 Jazzinghen

Everything should be fixed now.

Jazzinghen avatar Jul 22 '25 09:07 Jazzinghen

Awesome! Almost all fixed. Thank you! 👍

sobolevn avatar Jul 22 '25 15:07 sobolevn

This is strange. I don't get the same error on my PC. I'll try to reproduce it, otherwise I might need some more info than what the CI pipeline is printing.

Jazzinghen avatar Jul 23 '25 04:07 Jazzinghen

Oh, wait, the error is not generated by the command I was testing. I am dumb.

Jazzinghen avatar Jul 23 '25 04:07 Jazzinghen

This was a pretty long debugging session, however it seems like mypy started checking for additional magic attributes. One of those, __await__, was checked in all the type aliases of KindN, even though it does not exist. I hope this solution is the correct one, however if you have a better solution I'd like to hear about it. :D

Jazzinghen avatar Jul 23 '25 07:07 Jazzinghen

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 100.00%. Comparing base (82ef3ef) to head (d90c543). :warning: Report is 421 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2149    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           80        81     +1     
  Lines         2485      2581    +96     
  Branches       437        44   -393     
==========================================
+ Hits          2485      2581    +96     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 23 '25 09:07 codecov[bot]

Thank you for your patience!

Jazzinghen avatar Jul 24 '25 00:07 Jazzinghen