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 mappings for mypy >= 0.8 (shows tests failing) #189

Closed
cdgriffith opened this issue Feb 13, 2021 · 1 comment
Closed

Fix mappings for mypy >= 0.8 (shows tests failing) #189

cdgriffith opened this issue Feb 13, 2021 · 1 comment
Labels

Comments

@cdgriffith
Copy link
Owner

cdgriffith commented Feb 13, 2021

Newest version of mypy is giving the error:

box\box.py:259: error: Argument 1 of "__or__" is incompatible with supertype "dict"; supertype defines the argument type as "Mapping[Any, Any]"
box\box.py:259: note: This violates the Liskov substitution principle
box\box.py:259: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
box\box.py:273: error: Argument 1 of "__ior__" is incompatible with supertype "dict"; supertype defines the argument type as "Mapping[Any, Any]"
box\box.py:273: note: This violates the Liskov substitution principle
box\box.py:273: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
box\box.py:273: error: Argument 1 of "__ior__" is incompatible with "__or__" of supertype "dict"; supertype defines the argument type as "Mapping[Any, Any]"
Found 3 errors in 1 file (checked 8 source files)

Which is making tests fail. Of course the release of mypy 0.800 happened between the window of the last update to the PR and the actual release, so now it looks bad. Whoops.

@cdgriffith cdgriffith changed the title Fix mypy tests for mypy >= 0.8 (shows tests failing) Fix mappings for mypy >= 0.8 (shows tests failing) Feb 13, 2021
@cdgriffith cdgriffith added the bug label Feb 13, 2021
cdgriffith added a commit that referenced this issue Feb 13, 2021
cdgriffith added a commit that referenced this issue Jul 19, 2021
* Changing to use tomli instead of toml by default as it is faster and toml 1.0.0 compatible
* Fixing #189 by adding mappings for mypy
cdgriffith added a commit that referenced this issue Aug 1, 2021
* Adding testing for Python 3.10-dev
* Changing to use tomli instead of toml by default as it is faster and toml 1.0.0 compatible
* Fixing #189 by adding mappings for mypy
cdgriffith added a commit that referenced this issue Aug 15, 2021
* Adding py.typed for mypy support (thanks to Dominic)
* Adding testing for Python 3.10-dev
* Fixing #189 by adding mappings for mypy
* Fixing setdefault behavior with box_dots (thanks to ipcoder)
* Changing #193 how magic methods are handled with default_box (thanks to Rexbard)

Co-authored-by: Dominic <yobmod@gmail.com>
@cdgriffith
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant