-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Metaclass conflict check improvements #17682
Open
robsdedude
wants to merge
6
commits into
python:master
Choose a base branch
from
robsdedude:metaclass-conflict-check-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Metaclass conflict check improvements #17682
robsdedude
wants to merge
6
commits into
python:master
from
robsdedude:metaclass-conflict-check-improvements
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The tests passed locally. I'm not quite sure what's going on. I'll dig deeper when I'm back from vacation in about a week. |
Diff from mypy_primer, showing the effect of this PR on open source code: artigraph (https://github.com/artigraph/artigraph)
- src/arti/versions/__init__.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]
- src/arti/versions/__init__.py:21: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/versions/__init__.py:31: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/versions/__init__.py:61: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/versions/__init__.py:75: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/statistics/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/annotations/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:26: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:44: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:48: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:61: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:70: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:74: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:78: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:82: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:86: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:90: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:94: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:98: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:130: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:134: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:138: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:142: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:147: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:151: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:155: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:159: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:163: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
- src/arti/types/__init__.py:169: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ src/arti/versions/__init__.py:17: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/versions/__init__.py:21: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/versions/__init__.py:31: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/versions/__init__.py:61: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/versions/__init__.py:75: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/statistics/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/annotations/__init__.py:8: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:26: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:44: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:48: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:61: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:70: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:74: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:78: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:82: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:86: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
+ src/arti/types/__init__.py:90: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: arti.internal.models.ModelMeta, pydantic._internal._model_construction.ModelMetaclass [metaclass]
... (truncated 356 lines) ...
ibis (https://github.com/ibis-project/ibis)
- ibis/common/collections.py:280: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ ibis/common/collections.py:280: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: abc.ABCMeta, ibis.common.bases.AbstractMeta [metaclass]
- ibis/common/collections.py:305: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ ibis/common/collections.py:305: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: ibis.common.bases.AbstractMeta, abc.ABCMeta [metaclass]
- ibis/common/tests/test_patterns.py:273: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ ibis/common/tests/test_patterns.py:273: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: abc.ABCMeta, ibis.common.bases.AbstractMeta [metaclass]
- ibis/common/tests/test_patterns.py:486: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ ibis/common/tests/test_patterns.py:486: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: abc.ABCMeta, ibis.common.bases.AbstractMeta [metaclass]
- ibis/common/tests/test_patterns.py:1211: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ ibis/common/tests/test_patterns.py:1211: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: ibis.common.bases.AbstractMeta, abc.ABCMeta [metaclass]
comtypes (https://github.com/enthought/comtypes)
- comtypes/typeinfo.py:194: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:194: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:289: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:289: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:406: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:406: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:450: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:450: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:455: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:455: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:459: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:459: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:470: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:470: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:1073: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:1073: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/typeinfo.py:1090: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/typeinfo.py:1090: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/errorinfo.py:10: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/errorinfo.py:10: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/errorinfo.py:21: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/errorinfo.py:21: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/errorinfo.py:38: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/errorinfo.py:38: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/automation.py:642: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/automation.py:642: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/automation.py:777: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/automation.py:777: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/_post_coinit/unknwn.py:371: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/_post_coinit/unknwn.py:371: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - own metaclass comtypes._post_coinit.unknwn._compointer_meta is not a subclass of [metaclass]
- comtypes/_post_coinit/unknwn.py:487: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/_post_coinit/unknwn.py:487: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - own metaclass comtypes._post_coinit.unknwn._cominterface_meta is not a subclass of _ctypes._CDataMeta [metaclass]
- comtypes/_post_coinit/misc.py:47: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/_post_coinit/misc.py:47: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/_post_coinit/misc.py:62: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/_post_coinit/misc.py:62: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:22: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:22: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:36: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:36: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:63: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:63: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:108: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:108: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:154: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:154: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/persist.py:214: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/persist.py:214: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/connectionpoints.py:20: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
+ comtypes/connectionpoints.py:20: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases - found metaclasses of bases: _ctypes._CDataMeta [metaclass]
- comtypes/connectionpoints.py:25: error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
... (truncated 33 lines) ...
steam.py (https://github.com/Gobot1234/steam.py)
- steam/utils.py:432: error: Dynamic metaclass not supported for "StructIO" [misc]
+ steam/utils.py:432: error: Dynamic metaclass not supported for "StructIO" [metaclass]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes some points of #14033:
metaclass
).I didn't attempt to fix that mypy follows the logic for determining the metaclass as documented whereas it should follow what the interpreter is actually doing (#14033 (comment)). I think such a change is better kept as a separate PR, which is why I don't want to close the issue with this PR.