Skip to content

Conversation

@zhuoxyang
Copy link

No description provided.

def get_obj_list(self):
"""
Get the list of objects.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

):
"""
Go to a specific path.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_menu_button_clicked(self, index, data_dict):
"""
Handle menu button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def slot_button_clicked(self, index):
"""
Handle button click event.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

menu = QMenu(self)
"""
Show the menu for a button.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def __init__(self, data_dict, parent=None):
"""
Initialize the base button.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

class MBaseButton(QtWidgets.QWidget):
"""
Base button widget for path navigation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Args:
path (str): File system path to parse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


"""
Parse file system path into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Args:
orm: Database ORM object that contains name, parent and tablename attributes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def parse_db_orm(orm):
"""
Parse database ORM object into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

else index.internalPointer()
)
selected = (
self.selectionModel().selectedRows() or
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

and event.propertyName() == "dayu_text"
):
is_text_change = (
event.type() == QtCore.QEvent.DynamicPropertyChange and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
MLineTabWidget
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace


class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

self.setMaximumHeight(
self.defaultItemHeight * count + (fw + vmargin + scrollHeight) * 2
max_height = (
self.defaultItemHeight * count +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

def parse_db_orm(orm):
"""
Parse database ORM object into a dictionary format.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

else index.internalPointer()
)
selected = (
self.selectionModel().selectedRows() or
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

and event.propertyName() == "dayu_text"
):
is_text_change = (
event.type() == QtCore.QEvent.DynamicPropertyChange and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
MLineTabWidget
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace


class MLineTabWidget(QtWidgets.QWidget):
"""MLineTabWidget"""
"""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

self.setMaximumHeight(
self.defaultItemHeight * count + (fw + vmargin + scrollHeight) * 2
max_height = (
self.defaultItemHeight * count +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break after binary operator

if os.path.exists(static_file):
return static_file
return ""

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line at end of file

Args:
file_name (str): Name of the file to find in static folder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def request_file(file_name):
"""
Get the absolute path of a static file.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

muyr and others added 17 commits July 16, 2025 17:32
* feat: compatible pyside6

* feat: add uv support for installation and testing

* docs: update README with detailed installation and usage instructions

* docs: update CHANGELOG for v0.3.0

* fix: update uv installation in CI workflows for Windows and Linux

* fix: create virtual environments for uv in CI workflows

* fix: activate virtual environments before running nox in CI workflows

* fix: register maya-test and blender-test sessions in noxfile

* fix: use direct pip install for nox in CI workflows

* fix: use direct pytest execution instead of nox for CI tests

* fix: use environment variable for Qt binding in Windows tests

* fix: ensure MAvatar properly handles default image when set to None

* fix: improve MAvatar pixmap handling for PySide2 compatibility

* fix: ensure MAvatar properly handles pixmap copies to avoid reference issues

* fix: ensure MAvatar preserves original pixmap reference for identity comparison

* refactor: rename MTabWidgetTest to TabWidget for consistency

* refactor: replace MAlert with MDivider in table_view_example

* fix: ensure MAvatar properly handles pixmap size in Windows with Python 3.8

* fix: ensure MAvatar properly maintains original pixmap reference for consistency

* chore: bump version to 0.3.0 for PySide6 compatibility release

* fix: update test_mavatar_default_image to avoid pixmap reference issues

---------

Co-authored-by: zhuolyang <zhuolyang@tencent.com>
@@ -0,0 +1,182 @@
# Import built-in modules
import os
import sys
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'sys' imported but unused

@@ -0,0 +1,137 @@
# Import built-in modules
import os
import sys
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'sys' imported but unused

"""
if THIS_ROOT not in sys.path:
sys.path.insert(0, str(THIS_ROOT))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


def setup_qt_test_env():
"""Setup environment for Qt testing.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

from nox_actions.test import test
from nox_actions.lint import lint, lint_fix
from nox_actions.maya_test import maya_test
from nox_actions.blender_test import blender_test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

# Import local modules
from nox_actions.test import test
from nox_actions.lint import lint, lint_fix
from nox_actions.maya_test import maya_test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file


# Import local modules
from nox_actions.test import test
from nox_actions.lint import lint, lint_fix
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

screen_geo = QtWidgets.QApplication.primaryScreen().geometry()
qtbot.mouseMove(button_normal, pos=QtCore.QPoint(10, 10)) # 先移到附近
qtbot.wait(100) # 等待一下
qtbot.mouseMove(QtWidgets.QWidget(), pos=QtCore.QPoint(screen_geo.width()-10, screen_geo.height()-10)) # 移到屏幕角落
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace around arithmetic operator

sys.path.insert(0, str(ROOT))

# Import local modules
from nox_actions.test import test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module level import not at top of file

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants