Skip to content

Commit

Permalink
QtCore: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Improve comments and import order

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
  • Loading branch information
dalthviz and CAM-Gerlach authored Jan 17, 2022
1 parent 6238a0d commit 88b7f9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qtpy/QtCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
Qt.BackButton = Qt.XButton1
Qt.ForwardButton = Qt.XButton2

# Map Qt6 removed obsolete ItemDataRole enum values
# Alias deprecated ItemDataRole enum values removed in Qt6
Qt.BackgroundColorRole = Qt.ItemDataRole.BackgroundColorRole = Qt.BackgroundRole
Qt.TextColorRole = Qt.ItemDataRole.TextColorRole = Qt.ForegroundRole

Expand All @@ -67,7 +67,7 @@
import PySide6.QtCore
__version__ = PySide6.QtCore.__version__

# Map Qt6 removed obsolete ItemDataRole enum values
# Alias deprecated ItemDataRole enum values removed in Qt6
Qt.BackgroundColorRole = Qt.ItemDataRole.BackgroundColorRole = Qt.BackgroundRole
Qt.TextColorRole = Qt.ItemDataRole.TextColorRole = Qt.ForegroundRole
Qt.MidButton = Qt.MouseButton.MiddleButton = Qt.MiddleButton
Expand Down
2 changes: 1 addition & 1 deletion qtpy/tests/test_qtcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from qtpy import PYQT5, PYQT6, PYSIDE2, PYQT_VERSION, PYSIDE6, QtCore
from qtpy import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PYQT_VERSION, QtCore


def test_qtmsghandler():
Expand Down

0 comments on commit 88b7f9c

Please sign in to comment.