-
Notifications
You must be signed in to change notification settings - Fork 123
Fix AttributeError: 'NoneType' object has no attribute 'COLOR' for Py… #2984
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
base: develop
Are you sure you want to change the base?
Conversation
…thon 3.13/3.14
- Change QtCore.Qt.black to QtGui.QColor('black') in DataType.COLOR and editor.py
- Handle None datatype in key_item method
|
Hi please see I have tried to fix the issue. Merge this pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a way more colors used
I added the pixi configuration. This didn't solve it.
Because this problem is not covered by a test, we need one before solving this situation. By this it is easier to figure what for the fix is needed. But I assume there are already tests failing because of a change in py313 or a library which is dependent.
The tests here are not running in py313.
| QtGui.QBrush(datatype.COLOR), QtCore.Qt.ForegroundRole) | ||
| if datatype: | ||
| key_item.setData(datatype.__class__.__name__, QtCore.Qt.ToolTipRole) | ||
| color = datatype.COLOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color is unused
| else: | ||
| key_item.setData("None", QtCore.Qt.ToolTipRole) | ||
| color = QtGui.QColor("black") | ||
| key_item.setData(QtGui.QBrush(color), QtCore.Qt.ForegroundRole) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, looks similiar to Qt6 syntax. When was that changed?
from the pixi config we have in both setups the same pyqt.
| source_model = self.json_model | ||
| # set default color | ||
| color = QtCore.Qt.black | ||
| color = QtGui.QColor("black") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pyqt version has not changed between py3.12 and py3.13
…thon 3.13/3.14
Purpose of PR?:
Fixes #
Does this PR introduce a breaking change?
If the changes in this PR are manually verified, list down the scenarios covered::
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes
Checklist:
<type>: <subject>