GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Makes `classes` compatible with `mypy` 1.2 by thepabloaguilar · Pull Request #487 · dry-python/classes

Conversation

@thepabloaguilar

@thepabloaguilar thepabloaguilar commented Apr 11, 2023

Copy link
Copy Markdown
Member

Makes classes compatible with mypy 1.2

Checklist

  • I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ayaka14732 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@thepabloaguilar thepabloaguilar self-assigned this Apr 11, 2023
@thepabloaguilar

thepabloaguilar commented Apr 11, 2023

Copy link
Copy Markdown
Member Author

@sobolevn just need a little of your help here with the errors!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Apr 11, 2023

Copy link
Copy Markdown
Member

tests/test_typeclass/test_typed_dict.py:25: error: Invalid metaclass "_Meta" [misc]

This test needs some love.
https://github.com/dry-python/classes/blob/master/tests/test_typeclass/test_typed_dict.py#L9

Right now it is in a semi-broken state.

tests/test_typeclass/test_call.py:17: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]

Can be just ignored.
This is probably a mypy bug.
You can also report this to mypy.

tests/test_associated_type/test_variadic_generic.py:34: error: Function "Type[Example[Any]]" could always be true in boolean context [truthy-function]

Can be just ignored.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thepabloaguilar
thepabloaguilar force-pushed the bumps-mypy branch 3 times, most recently from b22e008 to 13d3f44 Compare April 12, 2023 03:11
@codecov-commenter

codecov-commenter commented Apr 12, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #487 (13d3f44) into master (4b0e9e5) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #487   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         3    +1     
  Lines          103       106    +3     
  Branches        18        17    -1     
=========================================
+ Hits           103       106    +3     
Impacted Files Coverage Δ
classes/_typeclass.py 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thepabloaguilar
Makes classes compatible with mypy 1.2
3c1de4f
@thepabloaguilar
thepabloaguilar force-pushed the bumps-mypy branch from 13d3f44 to 3c1de4f Compare April 12, 2023 03:26
@thepabloaguilar

thepabloaguilar commented Apr 13, 2023

Copy link
Copy Markdown
Member Author

I need to dig more deep to see why this expected error is not being raised anymore:

main:29: error: Instance "TypedDict('main.Other', {'name': builtins.str, 'registered': builtins.bool})" does not match inferred type "main.UserDict"
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zhukovgreen

zhukovgreen commented Apr 26, 2023

Copy link
Copy Markdown

Updated #483 to have also mypy^1.2.0. Can you guys either cherry-pick it here or review after this one is merged

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zhukovgreen zhukovgreen mentioned this pull request Apr 26, 2023
Add mypy-plugin extras to allow proper mypy version when using mypy plugin #483
Open
2 of 5 tasks
@sobolevn

sobolevn commented Apr 26, 2023

Copy link
Copy Markdown
Member

Sure!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Apr 26, 2023

Copy link
Copy Markdown
Member

You can do the same for returns

zhukovgreen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zhukovgreen

zhukovgreen commented Apr 26, 2023

Copy link
Copy Markdown

Added dry-python/returns#1605

sobolevn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@guitvcer

guitvcer commented Mar 12, 2025

Copy link
Copy Markdown

I need to dig more deep to see why this expected error is not being raised anymore:

main:29: error: Instance "TypedDict('main.Other', {'name': builtins.str, 'registered': builtins.bool})" does not match inferred type "main.UserDict"

Hello. How are things going? If you wish, I can try to fix it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Mar 12, 2025

Copy link
Copy Markdown
Member

@guitvcer you are very welcome to create a PR with new mypy version :)
It is rather hard to do, but I can help!

guitvcer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@thepabloaguilar thepabloaguilar

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@thepabloaguilar @sobolevn @codecov-commenter @zhukovgreen @guitvcer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.