From 460e376a02afbf655c07ea0023a047c8ca1871f0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:45:30 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.10.1 → 24.1.1](https://github.com/psf/black/compare/23.10.1...24.1.1) - [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b5dd06f..3f5b689 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,13 +10,13 @@ repos: - id: end-of-file-fixer - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 24.1.1 hooks: - id: black args: [--config, "./pyproject.toml"] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--settings-path, "./pyproject.toml"] From 64704af509898f44cc77e73a7ad367d616c4fe0b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:45:43 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ...00\344\270\252PySide6\347\250\213\345\272\217.py" | 4 +++- .../10-QWidget-\345\205\211\346\240\207.py" | 4 +++- .../07-QLineEdit-\345\205\211\346\240\207.py" | 4 +++- ...0\247\206\345\233\276\346\216\247\344\273\266.py" | 4 +++- ...5\274\217\343\200\201\345\217\252\350\257\273.py" | 4 +++- ...6\230\276\347\244\272\350\241\214\345\217\267.py" | 4 +++- ...6\225\260\345\200\274\346\226\207\346\234\254.py" | 4 +++- ...3\200\201\345\211\215\345\220\216\347\274\200.py" | 4 +++- ...4\273\213\344\270\216\345\210\233\345\273\272.py" | 4 +++- ...235\241\347\233\256\346\223\215\344\275\234-2.py" | 4 +++- ...4\273\213\344\270\216\345\210\233\345\273\272.py" | 4 +++- ...5\212\237\350\203\275\344\275\234\347\224\250.py" | 8 ++++++-- ...4\273\213\344\270\216\345\210\233\345\273\272.py" | 8 ++++++-- ...6\234\254\343\200\201\347\233\256\345\275\225.py" | 12 +++++++++--- ...1\235\231\346\200\201\346\226\271\346\263\225.py" | 9 +++++++-- 15 files changed, 61 insertions(+), 20 deletions(-) diff --git "a/01-HelloWorld-\345\237\272\346\234\254\347\273\223\346\236\204/01-HelloWorld-\347\254\254\344\270\200\344\270\252PySide6\347\250\213\345\272\217.py" "b/01-HelloWorld-\345\237\272\346\234\254\347\273\223\346\236\204/01-HelloWorld-\347\254\254\344\270\200\344\270\252PySide6\347\250\213\345\272\217.py" index ce51959..c5ac625 100644 --- "a/01-HelloWorld-\345\237\272\346\234\254\347\273\223\346\236\204/01-HelloWorld-\347\254\254\344\270\200\344\270\252PySide6\347\250\213\345\272\217.py" +++ "b/01-HelloWorld-\345\237\272\346\234\254\347\273\223\346\236\204/01-HelloWorld-\347\254\254\344\270\200\344\270\252PySide6\347\250\213\345\272\217.py" @@ -37,7 +37,9 @@ def magic(self) -> None: if __name__ == "__main__": - app = QtWidgets.QApplication(sys.argv) # 创建APP,将运行脚本时(可能的)的其他参数传给Qt以初始化 + app = QtWidgets.QApplication( + sys.argv + ) # 创建APP,将运行脚本时(可能的)的其他参数传给Qt以初始化 widget = MyWidget() # 实例化一个MyWidget类对象 widget.show() # 显示窗口 sys.exit(app.exec()) # 正常退出APP:app.exec()关闭app,sys.exit()退出进程 diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/01-QWidget-\346\216\247\344\273\266\347\232\204\345\237\272\347\261\273/10-QWidget-\345\205\211\346\240\207.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/01-QWidget-\346\216\247\344\273\266\347\232\204\345\237\272\347\261\273/10-QWidget-\345\205\211\346\240\207.py" index 9c286a6..8e84f4d 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/01-QWidget-\346\216\247\344\273\266\347\232\204\345\237\272\347\261\273/10-QWidget-\345\205\211\346\240\207.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/01-QWidget-\346\216\247\344\273\266\347\232\204\345\237\272\347\261\273/10-QWidget-\345\205\211\346\240\207.py" @@ -57,7 +57,9 @@ def test_01(self) -> None: # 设置为自定义图案光标 pixmap = QtGui.QPixmap("../../Resources/Icons/snowflake_128px.ico").scaled(52, 52) - my_cursor = QtGui.QCursor(pixmap, 26, 26) # 以图片像素点位置26,26为热点(光标实际所在位置坐标) + my_cursor = QtGui.QCursor( + pixmap, 26, 26 + ) # 以图片像素点位置26,26为热点(光标实际所在位置坐标) self.setCursor(my_cursor) # 设置label中的光标为Qt内置的其他光标 diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/03-QLineEdit-\345\215\225\350\241\214\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/07-QLineEdit-\345\205\211\346\240\207.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/03-QLineEdit-\345\215\225\350\241\214\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/07-QLineEdit-\345\205\211\346\240\207.py" index 375a794..8347a1a 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/03-QLineEdit-\345\215\225\350\241\214\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/07-QLineEdit-\345\205\211\346\240\207.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/03-QLineEdit-\345\215\225\350\241\214\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/07-QLineEdit-\345\205\211\346\240\207.py" @@ -74,7 +74,9 @@ def setup_ui(self) -> None: pos_layout = QtWidgets.QFormLayout() pos_layout.addRow(QtWidgets.QLabel("光标当前位于:"), self.pos_line_edit) pos_layout.addRow(QtWidgets.QLabel("将光标设置到:"), self.set_pos_spinbox) - pos_layout.addRow(QtWidgets.QLabel(f"{self.point.toTuple()}处的光标位于"), self.pos_at_label) + pos_layout.addRow( + QtWidgets.QLabel(f"{self.point.toTuple()}处的光标位于"), self.pos_at_label + ) pos_groupbox.setLayout(pos_layout) # ================ 光标移动风格 ======================= diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/07-QScrollArea-\346\273\232\345\212\250\345\214\272\345\237\237/02-QScrollArea-\350\247\206\345\233\276\346\216\247\344\273\266.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/07-QScrollArea-\346\273\232\345\212\250\345\214\272\345\237\237/02-QScrollArea-\350\247\206\345\233\276\346\216\247\344\273\266.py" index 1fc69ba..cc14d1c 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/07-QScrollArea-\346\273\232\345\212\250\345\214\272\345\237\237/02-QScrollArea-\350\247\206\345\233\276\346\216\247\344\273\266.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/07-QScrollArea-\346\273\232\345\212\250\345\214\272\345\237\237/02-QScrollArea-\350\247\206\345\233\276\346\216\247\344\273\266.py" @@ -77,7 +77,9 @@ def test_01(self) -> None: self.scroll_area.widget().resize(200, 400) # 尺寸小于滚动区域尺寸 # 设置对齐方式 - self.scroll_area.setAlignment(Qt.AlignHCenter | Qt.AlignBottom) # 设置为水平居中、垂直靠底部对齐 + self.scroll_area.setAlignment( + Qt.AlignHCenter | Qt.AlignBottom + ) # 设置为水平居中、垂直靠底部对齐 def test_02(self) -> None: """测试尺寸控制、确保可见功能""" diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/02-QPlainTextEdit-\346\215\242\350\241\214\346\226\271\345\274\217\343\200\201\345\217\252\350\257\273.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/02-QPlainTextEdit-\346\215\242\350\241\214\346\226\271\345\274\217\343\200\201\345\217\252\350\257\273.py" index 65e3035..8bef759 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/02-QPlainTextEdit-\346\215\242\350\241\214\346\226\271\345\274\217\343\200\201\345\217\252\350\257\273.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/02-QPlainTextEdit-\346\215\242\350\241\214\346\226\271\345\274\217\343\200\201\345\217\252\350\257\273.py" @@ -68,7 +68,9 @@ def test_01(self) -> None: """测试自动换行功能""" # 设置换行模式 - self.pte.setLineWrapMode(QtWidgets.QPlainTextEdit.LineWrapMode.WidgetWidth) # 自动换行(默认值) + self.pte.setLineWrapMode( + QtWidgets.QPlainTextEdit.LineWrapMode.WidgetWidth + ) # 自动换行(默认值) # self.pte.setLineWrapMode(QtWidgets.QPlainTextEdit.LineWrapMode.NoWrap) # 关闭自动换行 print(self.pte.lineWrapMode()) # 获取换行模式 diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/08-QPlainText-\346\241\210\344\276\213-\346\230\276\347\244\272\350\241\214\345\217\267.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/08-QPlainText-\346\241\210\344\276\213-\346\230\276\347\244\272\350\241\214\345\217\267.py" index 2b88baf..76811b1 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/08-QPlainText-\346\241\210\344\276\213-\346\230\276\347\244\272\350\241\214\345\217\267.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/08-TextEdit-\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250\344\270\216\351\230\205\350\257\273\345\231\250/01-QPlainTextEdit-\347\272\257\346\226\207\346\234\254\347\274\226\350\276\221\345\231\250/08-QPlainText-\346\241\210\344\276\213-\346\230\276\347\244\272\350\241\214\345\217\267.py" @@ -23,7 +23,9 @@ def setup_ui(self) -> None: self.pte = QtWidgets.QPlainTextEdit(self) self.pte.resize(350, 400) self.pte.move(150, 80) - self.pte.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOn) # 始终显示滚动条 + self.pte.setVerticalScrollBarPolicy( + QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOn + ) # 始终显示滚动条 # 用于限制line_num_label位置尺寸的父控件 line_num_widget = QtWidgets.QWidget(self) diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/01-QAbstractSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206\346\212\275\350\261\241\345\237\272\347\261\273/02-QAbstractSpinBox-\350\216\267\345\217\226\346\226\207\346\234\254\343\200\201\345\257\271\351\275\220\346\226\271\345\274\217\343\200\201\345\215\203\345\210\206\347\254\246\343\200\201\347\211\271\346\225\260\345\200\274\346\226\207\346\234\254.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/01-QAbstractSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206\346\212\275\350\261\241\345\237\272\347\261\273/02-QAbstractSpinBox-\350\216\267\345\217\226\346\226\207\346\234\254\343\200\201\345\257\271\351\275\220\346\226\271\345\274\217\343\200\201\345\215\203\345\210\206\347\254\246\343\200\201\347\211\271\346\225\260\345\200\274\346\226\207\346\234\254.py" index bee6b21..edb88da 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/01-QAbstractSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206\346\212\275\350\261\241\345\237\272\347\261\273/02-QAbstractSpinBox-\350\216\267\345\217\226\346\226\207\346\234\254\343\200\201\345\257\271\351\275\220\346\226\271\345\274\217\343\200\201\345\215\203\345\210\206\347\254\246\343\200\201\347\211\271\346\225\260\345\200\274\346\226\207\346\234\254.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/01-QAbstractSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206\346\212\275\350\261\241\345\237\272\347\261\273/02-QAbstractSpinBox-\350\216\267\345\217\226\346\226\207\346\234\254\343\200\201\345\257\271\351\275\220\346\226\271\345\274\217\343\200\201\345\215\203\345\210\206\347\254\246\343\200\201\347\211\271\346\225\260\345\200\274\346\226\207\346\234\254.py" @@ -50,7 +50,9 @@ def setup_ui(self) -> None: btn.clicked.connect(lambda: print(spin_box.text())) # type: ignore # =================================== 文本对齐方式 =================================== - spin_box.setAlignment(QtCore.Qt.AlignmentFlag.AlignHCenter) # 更改为水平居中对齐,默认为左对齐 + spin_box.setAlignment( + QtCore.Qt.AlignmentFlag.AlignHCenter + ) # 更改为水平居中对齐,默认为左对齐 # ==================================== 千分符 =================================== spin_box.setGroupSeparatorShown(True) # 显示千分符 diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/02-QSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/03-QSpinBox-\346\225\260\345\200\274\343\200\201\346\225\260\345\200\274\346\230\276\347\244\272\350\277\233\345\210\266\343\200\201\345\211\215\345\220\216\347\274\200.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/02-QSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/03-QSpinBox-\346\225\260\345\200\274\343\200\201\346\225\260\345\200\274\346\230\276\347\244\272\350\277\233\345\210\266\343\200\201\345\211\215\345\220\216\347\274\200.py" index 3c272fd..474cd96 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/02-QSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/03-QSpinBox-\346\225\260\345\200\274\343\200\201\346\225\260\345\200\274\346\230\276\347\244\272\350\277\233\345\210\266\343\200\201\345\211\215\345\220\216\347\274\200.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/02-QSpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/03-QSpinBox-\346\225\260\345\200\274\343\200\201\346\225\260\345\200\274\346\230\276\347\244\272\350\277\233\345\210\266\343\200\201\345\211\215\345\220\216\347\274\200.py" @@ -58,7 +58,9 @@ def setup_ui(self) -> None: spinbox.setSuffix(" cm") # 设置后缀 # spinbox.setPrefix("$ ") # 设置前缀 print(f"完整文本为{spinbox.text()}") # 获取文本时会获取到包含前后缀的完整文本 - print(f"数值为{spinbox.text().removesuffix(spinbox.suffix())}") # Python3.9提供的移除后缀方法 + print( + f"数值为{spinbox.text().removesuffix(spinbox.suffix())}" + ) # Python3.9提供的移除后缀方法 print(f"数值为{spinbox.cleanText()}") diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/04-QDateTimeEdit-\346\227\245\346\234\237\346\227\266\351\227\264\347\274\226\350\276\221\345\231\250/01-QDateTimeEdit-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/04-QDateTimeEdit-\346\227\245\346\234\237\346\227\266\351\227\264\347\274\226\350\276\221\345\231\250/01-QDateTimeEdit-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" index 94328fe..f733d1f 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/04-QDateTimeEdit-\346\227\245\346\234\237\346\227\266\351\227\264\347\274\226\350\276\221\345\231\250/01-QDateTimeEdit-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/10-SpinBox-\346\225\260\345\200\274\350\256\276\345\256\232\346\241\206/04-QDateTimeEdit-\346\227\245\346\234\237\346\227\266\351\227\264\347\274\226\350\276\221\345\231\250/01-QDateTimeEdit-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" @@ -36,7 +36,9 @@ def setup_ui(self) -> None: # dte = QtWidgets.QDateTimeEdit(self) # 创建空的日期时间编辑器 # dte = QtWidgets.QDateTimeEdit(my_time, self) # 使用QTime初始化 # dte = QtWidgets.QDateTimeEdit(my_date, self) # 使用QDate初始化 - dte = QtWidgets.QDateTimeEdit(QtCore.QDateTime.currentDateTime(), self) # 使用QDateTime初始化 + dte = QtWidgets.QDateTimeEdit( + QtCore.QDateTime.currentDateTime(), self + ) # 使用QDateTime初始化 dte.move(200, 200) diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/01-QComboBox-\347\273\204\345\220\210\344\270\213\346\213\211\346\241\206/03-QComboBox-\346\235\241\347\233\256\346\223\215\344\275\234-2.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/01-QComboBox-\347\273\204\345\220\210\344\270\213\346\213\211\346\241\206/03-QComboBox-\346\235\241\347\233\256\346\223\215\344\275\234-2.py" index 974c15e..f3d2a8d 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/01-QComboBox-\347\273\204\345\220\210\344\270\213\346\213\211\346\241\206/03-QComboBox-\346\235\241\347\233\256\346\223\215\344\275\234-2.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/01-QComboBox-\347\273\204\345\220\210\344\270\213\346\213\211\346\241\206/03-QComboBox-\346\235\241\347\233\256\346\223\215\344\275\234-2.py" @@ -87,7 +87,9 @@ def setup_ui(self) -> None: cbb.setEditText("000") # 将当前文本设置为00,而不影响其他条目 # 设置尺寸调整策略 - cbb.setSizeAdjustPolicy(QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents) # 总是根据内容调整尺寸 + cbb.setSizeAdjustPolicy( + QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToContents + ) # 总是根据内容调整尺寸 # 限制最小字符数 cbb.setMinimumContentsLength(3) diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/01-QFontComboBox-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/01-QFontComboBox-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" index e1d4f48..31d61e9 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/01-QFontComboBox-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/01-QFontComboBox-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" @@ -29,7 +29,9 @@ def setup_ui(self) -> None: fcb = QtWidgets.QFontComboBox() # 创建示例文本并连接信号,当用户选择字体改变时,对应改变示例文本的字体 - text_label = QtWidgets.QLabel("我能吞下玻璃而不伤身体\nThe quick brown fox jumps over the lazy dog.") + text_label = QtWidgets.QLabel( + "我能吞下玻璃而不伤身体\nThe quick brown fox jumps over the lazy dog." + ) fcb.currentFontChanged.connect(text_label.setFont) # type: ignore # 使用布局管理器布局界面 diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\212\237\350\203\275\344\275\234\347\224\250.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\212\237\350\203\275\344\275\234\347\224\250.py" index 6849a9c..f60acfe 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\212\237\350\203\275\344\275\234\347\224\250.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/11-ComboBox-\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\255\227\344\275\223\344\270\213\346\213\211\346\241\206/02-QFontComboBox-\345\212\237\350\203\275\344\275\234\347\224\250.py" @@ -56,7 +56,9 @@ def setup_ui(self) -> None: fcb = QtWidgets.QFontComboBox() # 创建示例文本并连接信号,当用户选择字体改变时,对应改变示例文本的字体 - text_label = QtWidgets.QLabel("我能吞下玻璃而不伤身体。\nThe quick brown fox jumps over the lazy dog.") + text_label = QtWidgets.QLabel( + "我能吞下玻璃而不伤身体。\nThe quick brown fox jumps over the lazy dog." + ) fcb.currentFontChanged.connect(text_label.setFont) # type: ignore # 使用布局管理器布局界面 @@ -66,7 +68,9 @@ def setup_ui(self) -> None: self.setLayout(layout) # ======================== 设置显示字体 ======================== - fcb.setDisplayFont("Arial", QtGui.QFont("Arial Black", italic=True)) # 注意在本地测试时使用本机已安装的字体 + fcb.setDisplayFont( + "Arial", QtGui.QFont("Arial Black", italic=True) + ) # 注意在本地测试时使用本机已安装的字体 # 此时在combobox中的"Arial"条目是用黑体斜体显示的,而非原来的Arial字体 # ======================== 设置示例文本、书写系统 ======================== diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/01-QFileDialog-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/01-QFileDialog-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" index eaf3bcd..3d2b88b 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/01-QFileDialog-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/01-QFileDialog-\347\256\200\344\273\213\344\270\216\345\210\233\345\273\272.py" @@ -28,8 +28,12 @@ def setup_dialog(self) -> None: """配置对话框属性功能""" self.dialog.setAcceptMode(QtWidgets.QFileDialog.AcceptMode.AcceptOpen) # 打开模式 self.dialog.setFileMode(QtWidgets.QFileDialog.FileMode.ExistingFiles) # 选择现有文件 - self.dialog.setLabelText(QtWidgets.QFileDialog.DialogLabel.Accept, "选择") # 为「接受」按键指定文本 - self.dialog.setLabelText(QtWidgets.QFileDialog.DialogLabel.Reject, "取消") # 为「拒绝」按键指定文本 + self.dialog.setLabelText( + QtWidgets.QFileDialog.DialogLabel.Accept, "选择" + ) # 为「接受」按键指定文本 + self.dialog.setLabelText( + QtWidgets.QFileDialog.DialogLabel.Reject, "取消" + ) # 为「拒绝」按键指定文本 def setup_ui(self) -> None: """设置界面""" diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/03-QFileDialog-\351\273\230\350\256\244\345\220\216\347\274\200\345\220\215\343\200\201\346\240\207\347\255\276\346\226\207\346\234\254\343\200\201\347\233\256\345\275\225.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/03-QFileDialog-\351\273\230\350\256\244\345\220\216\347\274\200\345\220\215\343\200\201\346\240\207\347\255\276\346\226\207\346\234\254\343\200\201\347\233\256\345\275\225.py" index 60742ac..556c1fc 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/03-QFileDialog-\351\273\230\350\256\244\345\220\216\347\274\200\345\220\215\343\200\201\346\240\207\347\255\276\346\226\207\346\234\254\343\200\201\347\233\256\345\275\225.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/03-QFileDialog-\346\226\207\344\273\266\345\257\271\350\257\235\346\241\206/03-QFileDialog-\351\273\230\350\256\244\345\220\216\347\274\200\345\220\215\343\200\201\346\240\207\347\255\276\346\226\207\346\234\254\343\200\201\347\233\256\345\275\225.py" @@ -38,14 +38,20 @@ def __init__(self, *args, **kwargs): def setup_dialog(self) -> None: """设置文件对话框""" - self.dialog.setAcceptMode(QtWidgets.QFileDialog.AcceptMode.AcceptSave) # 文件对话框用于保存文件 + self.dialog.setAcceptMode( + QtWidgets.QFileDialog.AcceptMode.AcceptSave + ) # 文件对话框用于保存文件 # 默认后缀名 self.dialog.setDefaultSuffix("txt") # 设置默认后缀名 # 标签文本 - self.dialog.setLabelText(QtWidgets.QFileDialog.DialogLabel.Accept, "保存") # 将Accept按钮文本设置为保存 - self.dialog.setLabelText(QtWidgets.QFileDialog.DialogLabel.Reject, "取消") # 将Reject标签文本设置为取消 + self.dialog.setLabelText( + QtWidgets.QFileDialog.DialogLabel.Accept, "保存" + ) # 将Accept按钮文本设置为保存 + self.dialog.setLabelText( + QtWidgets.QFileDialog.DialogLabel.Reject, "取消" + ) # 将Reject标签文本设置为取消 def setup_ui(self) -> None: """设置界面""" diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/05-QMessageBox-\344\277\241\346\201\257\346\217\220\347\244\272\346\241\206/04-QMessageBox-\351\235\231\346\200\201\346\226\271\346\263\225.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/05-QMessageBox-\344\277\241\346\201\257\346\217\220\347\244\272\346\241\206/04-QMessageBox-\351\235\231\346\200\201\346\226\271\346\263\225.py" index 96def6b..3b69be4 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/05-QMessageBox-\344\277\241\346\201\257\346\217\220\347\244\272\346\241\206/04-QMessageBox-\351\235\231\346\200\201\346\226\271\346\263\225.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/12-Dialog-\345\257\271\350\257\235\346\241\206/05-QMessageBox-\344\277\241\346\201\257\346\217\220\347\244\272\346\241\206/04-QMessageBox-\351\235\231\346\200\201\346\226\271\346\263\225.py" @@ -70,7 +70,9 @@ def test_static(self): """测试QMessageBox的静态方法""" self.about_btn.clicked.connect( - lambda: QMessageBox.about(self, "关于此程序", "本程序为PySide6 Code Tutorial中的一个案例") + lambda: QMessageBox.about( + self, "关于此程序", "本程序为PySide6 Code Tutorial中的一个案例" + ) ) # type: ignore self.about_qt_btn.clicked.connect(lambda: QMessageBox.aboutQt(self)) # type: ignore @@ -99,7 +101,10 @@ def show_info_dlg() -> None: def show_warn_dlg() -> None: """self.warning_btn对应的槽函数""" result = QMessageBox.warning( - self, "静态方法-警告", "警告:直接退出将不会保存修改", QMessageBox.StandardButton.Discard + self, + "静态方法-警告", + "警告:直接退出将不会保存修改", + QMessageBox.StandardButton.Discard, ) self.label.setText(f"用户选择了:{user_result_dict[result]}") self.label.adjustSize() From dbfa3ffd1f6467eda101827d8f410fa6425c6e64 Mon Sep 17 00:00:00 2001 From: muzing Date: Sat, 3 Feb 2024 17:38:07 +0800 Subject: [PATCH 3/6] Update dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新与调整依赖项及其描述文件; --- README.md | 1 - poetry.lock | 242 ++++++++++++++++++------------------------- pyproject.toml | 12 +-- requirements.txt | 6 +- requirements_dev.txt | 17 --- 5 files changed, 107 insertions(+), 171 deletions(-) delete mode 100644 requirements_dev.txt diff --git a/README.md b/README.md index 6d2fbc7..a6b6e92 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,6 @@ | 目录/文件 | 描述 | |------------------------------------------------|-------------------| | [requirements.txt](./requirements.txt) | 依赖项,运行本项目必备 | -| [requirements_dev.txt](./requirements_dev.txt) | 开发依赖项,为本项目提交贡献时需要 | | [pyproject.toml](./pyproject.toml) | 项目配置文件 | | [poetry.lock](./poetry.lock) | Poetry 依赖项版本约束文件 | | [.gitignore](./.gitignore) | git 忽略提交规则 | diff --git a/poetry.lock b/poetry.lock index 8e14f5c..e650ddf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,29 +2,33 @@ [[package]] name = "black" -version = "23.11.0" +version = "24.1.1" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dbea0bb8575c6b6303cc65017b46351dc5953eea5c0a59d7b7e3a2d2f433a911"}, - {file = "black-23.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:412f56bab20ac85927f3a959230331de5614aecda1ede14b373083f62ec24e6f"}, - {file = "black-23.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d136ef5b418c81660ad847efe0e55c58c8208b77a57a28a503a5f345ccf01394"}, - {file = "black-23.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:6c1cac07e64433f646a9a838cdc00c9768b3c362805afc3fce341af0e6a9ae9f"}, - {file = "black-23.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cf57719e581cfd48c4efe28543fea3d139c6b6f1238b3f0102a9c73992cbb479"}, - {file = "black-23.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:698c1e0d5c43354ec5d6f4d914d0d553a9ada56c85415700b81dc90125aac244"}, - {file = "black-23.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:760415ccc20f9e8747084169110ef75d545f3b0932ee21368f63ac0fee86b221"}, - {file = "black-23.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:58e5f4d08a205b11800332920e285bd25e1a75c54953e05502052738fe16b3b5"}, - {file = "black-23.11.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:45aa1d4675964946e53ab81aeec7a37613c1cb71647b5394779e6efb79d6d187"}, - {file = "black-23.11.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4c44b7211a3a0570cc097e81135faa5f261264f4dfaa22bd5ee2875a4e773bd6"}, - {file = "black-23.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a9acad1451632021ee0d146c8765782a0c3846e0e0ea46659d7c4f89d9b212b"}, - {file = "black-23.11.0-cp38-cp38-win_amd64.whl", hash = "sha256:fc7f6a44d52747e65a02558e1d807c82df1d66ffa80a601862040a43ec2e3142"}, - {file = "black-23.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7f622b6822f02bfaf2a5cd31fdb7cd86fcf33dab6ced5185c35f5db98260b055"}, - {file = "black-23.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:250d7e60f323fcfc8ea6c800d5eba12f7967400eb6c2d21ae85ad31c204fb1f4"}, - {file = "black-23.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5133f5507007ba08d8b7b263c7aa0f931af5ba88a29beacc4b2dc23fcefe9c06"}, - {file = "black-23.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:421f3e44aa67138ab1b9bfbc22ee3780b22fa5b291e4db8ab7eee95200726b07"}, - {file = "black-23.11.0-py3-none-any.whl", hash = "sha256:54caaa703227c6e0c87b76326d0862184729a69b73d3b7305b6288e1d830067e"}, - {file = "black-23.11.0.tar.gz", hash = "sha256:4c68855825ff432d197229846f971bc4d6666ce90492e5b02013bcaca4d9ab05"}, + {file = "black-24.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2588021038bd5ada078de606f2a804cadd0a3cc6a79cb3e9bb3a8bf581325a4c"}, + {file = "black-24.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a95915c98d6e32ca43809d46d932e2abc5f1f7d582ffbe65a5b4d1588af7445"}, + {file = "black-24.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fa6a0e965779c8f2afb286f9ef798df770ba2b6cee063c650b96adec22c056a"}, + {file = "black-24.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:5242ecd9e990aeb995b6d03dc3b2d112d4a78f2083e5a8e86d566340ae80fec4"}, + {file = "black-24.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fc1ec9aa6f4d98d022101e015261c056ddebe3da6a8ccfc2c792cbe0349d48b7"}, + {file = "black-24.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0269dfdea12442022e88043d2910429bed717b2d04523867a85dacce535916b8"}, + {file = "black-24.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3d64db762eae4a5ce04b6e3dd745dcca0fb9560eb931a5be97472e38652a161"}, + {file = "black-24.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:5d7b06ea8816cbd4becfe5f70accae953c53c0e53aa98730ceccb0395520ee5d"}, + {file = "black-24.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e2c8dfa14677f90d976f68e0c923947ae68fa3961d61ee30976c388adc0b02c8"}, + {file = "black-24.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a21725862d0e855ae05da1dd25e3825ed712eaaccef6b03017fe0853a01aa45e"}, + {file = "black-24.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07204d078e25327aad9ed2c64790d681238686bce254c910de640c7cc4fc3aa6"}, + {file = "black-24.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:a83fe522d9698d8f9a101b860b1ee154c1d25f8a82ceb807d319f085b2627c5b"}, + {file = "black-24.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:08b34e85170d368c37ca7bf81cf67ac863c9d1963b2c1780c39102187ec8dd62"}, + {file = "black-24.1.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7258c27115c1e3b5de9ac6c4f9957e3ee2c02c0b39222a24dc7aa03ba0e986f5"}, + {file = "black-24.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40657e1b78212d582a0edecafef133cf1dd02e6677f539b669db4746150d38f6"}, + {file = "black-24.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e298d588744efda02379521a19639ebcd314fba7a49be22136204d7ed1782717"}, + {file = "black-24.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:34afe9da5056aa123b8bfda1664bfe6fb4e9c6f311d8e4a6eb089da9a9173bf9"}, + {file = "black-24.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:854c06fb86fd854140f37fb24dbf10621f5dab9e3b0c29a690ba595e3d543024"}, + {file = "black-24.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3897ae5a21ca132efa219c029cce5e6bfc9c3d34ed7e892113d199c0b1b444a2"}, + {file = "black-24.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:ecba2a15dfb2d97105be74bbfe5128bc5e9fa8477d8c46766505c1dda5883aac"}, + {file = "black-24.1.1-py3-none-any.whl", hash = "sha256:5cdc2e2195212208fbcae579b931407c1fa9997584f0a415421748aeafff1168"}, + {file = "black-24.1.1.tar.gz", hash = "sha256:48b5760dcbfe5cf97fd4fba23946681f3a81514c6ab8a45b50da67ac8fbc6c7b"}, ] [package.dependencies] @@ -38,7 +42,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -100,13 +104,13 @@ reference = "tsinghua_mirror" [[package]] name = "distlib" -version = "0.3.7" +version = "0.3.8" description = "Distribution utilities" optional = false python-versions = "*" files = [ - {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, - {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [package.source] @@ -137,13 +141,13 @@ reference = "tsinghua_mirror" [[package]] name = "identify" -version = "2.5.32" +version = "2.5.33" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.32-py2.py3-none-any.whl", hash = "sha256:0b7656ef6cba81664b783352c73f8c24b39cf82f926f78f4550eda928e5e0545"}, - {file = "identify-2.5.32.tar.gz", hash = "sha256:5d9979348ec1a21c768ae07e0a652924538e8bce67313a73cb0f681cf08ba407"}, + {file = "identify-2.5.33-py2.py3-none-any.whl", hash = "sha256:d40ce5fcd762817627670da8a7d8d8e65f24342d14539c59488dc603bf662e34"}, + {file = "identify-2.5.33.tar.gz", hash = "sha256:161558f9fe4559e1557e1bff323e8631f6a0e4837f7497767c1782832f16b62d"}, ] [package.extras] @@ -156,20 +160,17 @@ reference = "tsinghua_mirror" [[package]] name = "isort" -version = "5.12.0" +version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, ] [package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] +colors = ["colorama (>=0.4.6)"] [package.source] type = "legacy" @@ -178,38 +179,38 @@ reference = "tsinghua_mirror" [[package]] name = "mypy" -version = "1.7.0" +version = "1.8.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5da84d7bf257fd8f66b4f759a904fd2c5a765f70d8b52dde62b521972a0a2357"}, - {file = "mypy-1.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a3637c03f4025f6405737570d6cbfa4f1400eb3c649317634d273687a09ffc2f"}, - {file = "mypy-1.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b633f188fc5ae1b6edca39dae566974d7ef4e9aaaae00bc36efe1f855e5173ac"}, - {file = "mypy-1.7.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d6ed9a3997b90c6f891138e3f83fb8f475c74db4ccaa942a1c7bf99e83a989a1"}, - {file = "mypy-1.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:1fe46e96ae319df21359c8db77e1aecac8e5949da4773c0274c0ef3d8d1268a9"}, - {file = "mypy-1.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:df67fbeb666ee8828f675fee724cc2cbd2e4828cc3df56703e02fe6a421b7401"}, - {file = "mypy-1.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a79cdc12a02eb526d808a32a934c6fe6df07b05f3573d210e41808020aed8b5d"}, - {file = "mypy-1.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f65f385a6f43211effe8c682e8ec3f55d79391f70a201575def73d08db68ead1"}, - {file = "mypy-1.7.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0e81ffd120ee24959b449b647c4b2fbfcf8acf3465e082b8d58fd6c4c2b27e46"}, - {file = "mypy-1.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:f29386804c3577c83d76520abf18cfcd7d68264c7e431c5907d250ab502658ee"}, - {file = "mypy-1.7.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:87c076c174e2c7ef8ab416c4e252d94c08cd4980a10967754f91571070bf5fbe"}, - {file = "mypy-1.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6cb8d5f6d0fcd9e708bb190b224089e45902cacef6f6915481806b0c77f7786d"}, - {file = "mypy-1.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93e76c2256aa50d9c82a88e2f569232e9862c9982095f6d54e13509f01222fc"}, - {file = "mypy-1.7.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:cddee95dea7990e2215576fae95f6b78a8c12f4c089d7e4367564704e99118d3"}, - {file = "mypy-1.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:d01921dbd691c4061a3e2ecdbfbfad029410c5c2b1ee88946bf45c62c6c91210"}, - {file = "mypy-1.7.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:185cff9b9a7fec1f9f7d8352dff8a4c713b2e3eea9c6c4b5ff7f0edf46b91e41"}, - {file = "mypy-1.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7a7b1e399c47b18feb6f8ad4a3eef3813e28c1e871ea7d4ea5d444b2ac03c418"}, - {file = "mypy-1.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc9fe455ad58a20ec68599139ed1113b21f977b536a91b42bef3ffed5cce7391"}, - {file = "mypy-1.7.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d0fa29919d2e720c8dbaf07d5578f93d7b313c3e9954c8ec05b6d83da592e5d9"}, - {file = "mypy-1.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b53655a295c1ed1af9e96b462a736bf083adba7b314ae775563e3fb4e6795f5"}, - {file = "mypy-1.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c1b06b4b109e342f7dccc9efda965fc3970a604db70f8560ddfdee7ef19afb05"}, - {file = "mypy-1.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:bf7a2f0a6907f231d5e41adba1a82d7d88cf1f61a70335889412dec99feeb0f8"}, - {file = "mypy-1.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:551d4a0cdcbd1d2cccdcc7cb516bb4ae888794929f5b040bb51aae1846062901"}, - {file = "mypy-1.7.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:55d28d7963bef00c330cb6461db80b0b72afe2f3c4e2963c99517cf06454e665"}, - {file = "mypy-1.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:870bd1ffc8a5862e593185a4c169804f2744112b4a7c55b93eb50f48e7a77010"}, - {file = "mypy-1.7.0-py3-none-any.whl", hash = "sha256:96650d9a4c651bc2a4991cf46f100973f656d69edc7faf91844e87fe627f7e96"}, - {file = "mypy-1.7.0.tar.gz", hash = "sha256:1e280b5697202efa698372d2f39e9a6713a0395a756b1c6bd48995f8d72690dc"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, + {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, + {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, + {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, + {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, + {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, + {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, + {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, + {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, + {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, + {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, + {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, + {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, + {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, + {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, + {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, + {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, + {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, ] [package.dependencies] @@ -281,13 +282,13 @@ reference = "tsinghua_mirror" [[package]] name = "pathspec" -version = "0.11.2" +version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, - {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, ] [package.source] @@ -297,18 +298,18 @@ reference = "tsinghua_mirror" [[package]] name = "platformdirs" -version = "3.11.0" +version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, - {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, ] [package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] [package.source] type = "legacy" @@ -317,13 +318,13 @@ reference = "tsinghua_mirror" [[package]] name = "pre-commit" -version = "3.5.0" +version = "3.6.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pre_commit-3.5.0-py2.py3-none-any.whl", hash = "sha256:841dc9aef25daba9a0238cd27984041fa0467b4199fc4852e27950664919f660"}, - {file = "pre_commit-3.5.0.tar.gz", hash = "sha256:5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32"}, + {file = "pre_commit-3.6.0-py2.py3-none-any.whl", hash = "sha256:c255039ef399049a5544b6ce13d135caba8f2c28c3b4033277a788f434308376"}, + {file = "pre_commit-3.6.0.tar.gz", hash = "sha256:d30bad9abf165f7785c15a21a1f46da7d0677cb00ee7ff4c579fd38922efe15d"}, ] [package.dependencies] @@ -338,66 +339,21 @@ type = "legacy" url = "https://pypi.tuna.tsinghua.edu.cn/simple" reference = "tsinghua_mirror" -[[package]] -name = "pyside6" -version = "6.6.0" -description = "Python bindings for the Qt cross-platform application and UI framework" -optional = false -python-versions = "<3.13,>=3.8" -files = [ - {file = "PySide6-6.6.0-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:8103f14ed46a05e81acccbfc8388e3321e392fe54f3aa4a13336bd2ed8af5cd4"}, - {file = "PySide6-6.6.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:d487eab0f9bfc5c9141b474093e16207ff48cd9335e6465a01deb8dff0693fbc"}, - {file = "PySide6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:f40917b7a0c5c7f0c7faaa87e66ffa3b58d9d1d3d977d30fc07e193b82dd6749"}, - {file = "PySide6-6.6.0-cp38-abi3-win_amd64.whl", hash = "sha256:d41dfcfa32c89502cdaa20206b7e2aba199072f94b424bc6a4d6f50b10f4eb5a"}, -] - -[package.dependencies] -PySide6-Addons = "6.6.0" -PySide6-Essentials = "6.6.0" -shiboken6 = "6.6.0" - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "tsinghua_mirror" - -[[package]] -name = "pyside6-addons" -version = "6.6.0" -description = "Python bindings for the Qt cross-platform application and UI framework (Addons)" -optional = false -python-versions = "<3.13,>=3.8" -files = [ - {file = "PySide6_Addons-6.6.0-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:82fe1bb6a1aabf5ab3d8632072dc908aa37fc75b4b46e520258c441bd6b103fb"}, - {file = "PySide6_Addons-6.6.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5c56e963b841aeaacbc9ca8ca34df45308818dbd6fc59faa2b5a00a299e9892b"}, - {file = "PySide6_Addons-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:e145514a7c37ee3a6ad0ddd693f805ccff6fbd9640a24fb2ef6b7f852882d3e9"}, - {file = "PySide6_Addons-6.6.0-cp38-abi3-win_amd64.whl", hash = "sha256:414864f7cfbdf8ac4c5a745566a515f18b6018d5730bf5489cc2716b5e1fcd9b"}, -] - -[package.dependencies] -PySide6-Essentials = "6.6.0" -shiboken6 = "6.6.0" - -[package.source] -type = "legacy" -url = "https://pypi.tuna.tsinghua.edu.cn/simple" -reference = "tsinghua_mirror" - [[package]] name = "pyside6-essentials" -version = "6.6.0" +version = "6.6.1" description = "Python bindings for the Qt cross-platform application and UI framework (Essentials)" optional = false python-versions = "<3.13,>=3.8" files = [ - {file = "PySide6_Essentials-6.6.0-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:26d27e3e3a18acbc770a69a30774fd345414fe4932fcb89d2cfc4fc130c3eb33"}, - {file = "PySide6_Essentials-6.6.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:60284641619f964e1cb4d53cf3169d7a385e0378b74edb75610918d2aea1c4e5"}, - {file = "PySide6_Essentials-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:37d5d9c6ee696a17890f07e7ce1f88f890174bd4aca29f47922ecc959ab28352"}, - {file = "PySide6_Essentials-6.6.0-cp38-abi3-win_amd64.whl", hash = "sha256:97bbe33f584a09cef6a3fbc1295fb0fd7acaac345bc0f5601bf45d41c91683ac"}, + {file = "PySide6_Essentials-6.6.1-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:0c8917b15236956957178a8c9854641b12b11dad79ba0caf26147119164c30cf"}, + {file = "PySide6_Essentials-6.6.1-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:c7185616083eab6f42eaed598d97d49fac4f60ae2e7415194140d54f58c2b42c"}, + {file = "PySide6_Essentials-6.6.1-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:a383c3d60298392cfb621ec1a0cf24b4799321e6c5bbafc021d4cc8076ea1315"}, + {file = "PySide6_Essentials-6.6.1-cp38-abi3-win_amd64.whl", hash = "sha256:13da926e9e9ee3e26e3f66883a9d5e43726ddee70cdabddca02a07aa1ccf9484"}, ] [package.dependencies] -shiboken6 = "6.6.0" +shiboken6 = "6.6.1" [package.source] type = "legacy" @@ -470,13 +426,13 @@ reference = "tsinghua_mirror" [[package]] name = "setuptools" -version = "69.0.0" +version = "69.0.3" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.0.0-py3-none-any.whl", hash = "sha256:eb03b43f23910c5fd0909cb677ad017cd9531f493d27f8b3f5316ff1fb07390e"}, - {file = "setuptools-69.0.0.tar.gz", hash = "sha256:4c65d4f7891e5b046e9146913b87098144de2ca2128fbc10135b8556a6ddd946"}, + {file = "setuptools-69.0.3-py3-none-any.whl", hash = "sha256:385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05"}, + {file = "setuptools-69.0.3.tar.gz", hash = "sha256:be1af57fc409f93647f2e8e4573a142ed38724b8cdd389706a867bb4efcf1e78"}, ] [package.extras] @@ -491,15 +447,15 @@ reference = "tsinghua_mirror" [[package]] name = "shiboken6" -version = "6.6.0" +version = "6.6.1" description = "Python/C++ bindings helper module" optional = false python-versions = "<3.13,>=3.8" files = [ - {file = "shiboken6-6.6.0-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:bf23c43e53ffe6097853666ced05358c6640c378e992902a36c4cf77efb0223b"}, - {file = "shiboken6-6.6.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:456b89fb4b323e0c5002d92e4d346b48bb4e709db801208df8a0d6b4f5efc33d"}, - {file = "shiboken6-6.6.0-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:fb8c683206c3365f9240fff7f908485384893b02efb089b69ff816b4390baa9a"}, - {file = "shiboken6-6.6.0-cp38-abi3-win_amd64.whl", hash = "sha256:e62b2610b84f0ff7ed0181a4c535849cdc0654127097b5ef561cf0a33078f245"}, + {file = "shiboken6-6.6.1-cp38-abi3-macosx_11_0_universal2.whl", hash = "sha256:d756fd1fa945b787e8eef142f2eb571da0b4c4dc2f2eec1a7c12a474a2cf84e4"}, + {file = "shiboken6-6.6.1-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:fb102e4bc210006f0cdd0ce38e1aaaaf792bd871f02a2b3f01d07922c5cf4c59"}, + {file = "shiboken6-6.6.1-cp38-abi3-manylinux_2_31_aarch64.whl", hash = "sha256:a605960e72af5eef915991cee7eef4cc72f5cabe63b9ae1a955ceb3d3b0a00b9"}, + {file = "shiboken6-6.6.1-cp38-abi3-win_amd64.whl", hash = "sha256:072c35c4fe46ec13b364d9dc47b055bb2277ee3aeaab18c23650280ec362f62a"}, ] [package.source] @@ -525,13 +481,13 @@ reference = "tsinghua_mirror" [[package]] name = "typing-extensions" -version = "4.8.0" +version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.8.0-py3-none-any.whl", hash = "sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0"}, - {file = "typing_extensions-4.8.0.tar.gz", hash = "sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] [package.source] @@ -541,19 +497,19 @@ reference = "tsinghua_mirror" [[package]] name = "virtualenv" -version = "20.24.6" +version = "20.25.0" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.24.6-py3-none-any.whl", hash = "sha256:520d056652454c5098a00c0f073611ccbea4c79089331f60bf9d7ba247bb7381"}, - {file = "virtualenv-20.24.6.tar.gz", hash = "sha256:02ece4f56fbf939dbbc33c0715159951d6bf14aaf5457b092e4548e1382455af"}, + {file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"}, + {file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"}, ] [package.dependencies] distlib = ">=0.3.7,<1" filelock = ">=3.12.2,<4" -platformdirs = ">=3.9.1,<4" +platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] @@ -566,5 +522,5 @@ reference = "tsinghua_mirror" [metadata] lock-version = "2.0" -python-versions = ">=3.9,<3.12" -content-hash = "f0935cd97597e29fa2a4be1db5b3fe0ae0c1851311556dc48627ddf5460c3875" +python-versions = ">=3.9,<3.13" +content-hash = "9a69db5a92317df6c62461f504fea9c49c52182ac8863256e91bfdbc9c17ccb9" diff --git a/pyproject.toml b/pyproject.toml index eb392fd..154b49a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,14 +16,14 @@ url = "https://pypi.tuna.tsinghua.edu.cn/simple" priority = "default" [tool.poetry.dependencies] -python = ">=3.9,<3.12" -pyside6 = "^6.6.0" +python = ">=3.9,<3.13" +pyside6-essentials = "^6.2.0" [tool.poetry.group.dev.dependencies] -black = "^23.11.0" -isort = "^5.12.0" -mypy = "^1.7.0" -pre-commit = "^3.5.0" +black = "^24.1.0" +isort = "^5.13.0" +mypy = "^1.8.0" +pre-commit = "^3.6.0" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/requirements.txt b/requirements.txt index 1768a8b..52d53dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,4 @@ --index-url https://pypi.tuna.tsinghua.edu.cn/simple -pyside6-addons==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -pyside6-essentials==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -pyside6==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -shiboken6==6.4.2 ; python_version >= "3.9" and python_version < "3.12" +pyside6-essentials >= 6.2.0 ; python_version >= "3.9" and python_version < "3.13" +shiboken6 >= 6.2.0 ; python_version >= "3.9" and python_version < "3.13" diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index 2a3562a..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,17 +0,0 @@ ---index-url https://pypi.tuna.tsinghua.edu.cn/simple - -black==23.1.0 ; python_version >= "3.9" and python_version < "3.12" -click==8.1.3 ; python_version >= "3.9" and python_version < "3.12" -colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and platform_system == "Windows" -isort==5.12.0 ; python_version >= "3.9" and python_version < "3.12" -mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "3.12" -mypy==1.1.1 ; python_version >= "3.9" and python_version < "3.12" -packaging==23.0 ; python_version >= "3.9" and python_version < "3.12" -pathspec==0.11.1 ; python_version >= "3.9" and python_version < "3.12" -platformdirs==3.1.1 ; python_version >= "3.9" and python_version < "3.12" -pyside6-addons==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -pyside6-essentials==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -pyside6==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -shiboken6==6.4.2 ; python_version >= "3.9" and python_version < "3.12" -tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" -typing-extensions==4.5.0 ; python_version >= "3.9" and python_version < "3.12" From a7460cbdb111dafd0d3776357d7b0379056bebdc Mon Sep 17 00:00:00 2001 From: sltlala Date: Wed, 24 Jan 2024 00:50:09 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=AD=A3state=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8CQt.Checked.value=E6=89=8D=E6=98=AFin?= =?UTF-8?q?t=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../03-QCheckBox-\344\277\241\345\217\267.py" | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/02-Button-\346\214\211\351\222\256\346\216\247\344\273\266/04-QCheckBox-\345\244\215\351\200\211\346\241\206/03-QCheckBox-\344\277\241\345\217\267.py" "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/02-Button-\346\214\211\351\222\256\346\216\247\344\273\266/04-QCheckBox-\345\244\215\351\200\211\346\241\206/03-QCheckBox-\344\277\241\345\217\267.py" index 3b3e01a..eefe0d3 100644 --- "a/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/02-Button-\346\214\211\351\222\256\346\216\247\344\273\266/04-QCheckBox-\345\244\215\351\200\211\346\241\206/03-QCheckBox-\344\277\241\345\217\267.py" +++ "b/03-QtWidgets-\345\270\270\347\224\250\346\216\247\344\273\266/02-Button-\346\214\211\351\222\256\346\216\247\344\273\266/04-QCheckBox-\345\244\215\351\200\211\346\241\206/03-QCheckBox-\344\277\241\345\217\267.py" @@ -30,11 +30,11 @@ def test_01(self) -> None: @QtCore.Slot(int) def test_slot(state: int) -> None: - if state == Qt.Checked: + if state == Qt.Checked.value: print("复选框被选中了!") - elif state == Qt.Unchecked: + elif state == Qt.Unchecked.value: print("复选框被取消选中了!") - elif state == Qt.PartiallyChecked: + elif state == Qt.PartiallyChecked.value: print("复选框被部分选中!") self.cb.stateChanged.connect(test_slot) # type: ignore From 44b8421bc0eea164ef43d162d89e83a9545387e4 Mon Sep 17 00:00:00 2001 From: muzing Date: Sat, 3 Feb 2024 23:31:51 +0800 Subject: [PATCH 5/6] Update README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新自述文件; 添加 `CONTRIBUTING.md` --- .github/CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ README.md | 28 ++++++++++++++-------------- 2 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..6dddafe --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# 贡献指南 + +非常感谢你愿意为 PySide6-Code-Tutorial 项目提供贡献,请阅读以下内容,遵守一些基本规则,以便项目保持良好状态快速发展。 + +## 开始编码之前 + +如果你准备对代码进行超过数十行的修改或新增,我强烈建议你先提交一个 issue,谈谈你想实现的东西。在投入很多精力之前,我们应该先讨论一下是否要这样做,也可以确保我们不重复工作。 + +## 编写代码 + +### 准备开发环境 + +开发环境相较于使用环境较为复杂,确保已经安装 Python 3.11+ 和 [Poetry](https://python-poetry.org/docs/#installation),然后通过 Poetry 创建和安装开发环境: + +```shell +cd PySide6-Code-Tutorial +poetry init +poetry install +``` + +还需要通过 [pre-commit](https://pre-commit.com/) 安装 git 钩子: + +```shell +pre-commit install +``` + +### 代码风格 + +- 总体来讲,新增和修改的代码应接近原有代码的风格。尽量使代码有良好的可读性。 +- 请使用 [Black](https://black.readthedocs.io/en/stable/) 格式化代码,确保所有代码风格与项目一致。开发环境中已经安装了 Black,配置使用方法可以参考[这篇文章](https://muzing.top/posts/a29e4743/)。 +- 请为代码添加充分的[类型注解](https://muzing.top/posts/84a8da1c/),并能通过 [mypy](https://mypy.readthedocs.io/en/stable/) 检查不报错。 +- 请为模块、类、函数/方法、属性等添加 docstring 或注释,确保含义清晰易读。 + +## 拉取请求 + +新建一个指向 [muziing/PySide6-Code-Tutorial](https://github.com/muziing/PySide6-Code-Tutorial) 的 `main` 分支的拉取请求,我将尽快 review 代码并给出反馈。 diff --git a/README.md b/README.md index a6b6e92..f3d683b 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,7 @@ ### 二、配置虚拟环境与安装依赖 -**方式 A** :[Poetry](https://python-poetry.org/)(推荐) - -1. 确保 Python 版本与 [pyproject.toml](./pyproject.toml) 中要求的一致 -2. 按[官方文档](https://python-poetry.org/docs/#installation)提示安装 Poetry -3. 创建虚拟环境:`poetry env use /full/path/to/python`(注意替换路径) -4. 安装依赖:`poetry install --no-root --only main` -5. 使用该虚拟环境: `poetry shell`(或在 PyCharm 等 IDE 中配置) - -> 更多 Poetry 使用方法信息,请参阅其[官方文档](https://python-poetry.org/docs/)。 - -**方式 B** :[venv](https://docs.python.org/zh-cn/3/library/venv.html)(简单易用) +**方式 A** :[venv](https://docs.python.org/zh-cn/3/library/venv.html)(简单易用,推荐) 1. 确保 Python 版本与 [pyproject.toml](./pyproject.toml) 中要求的一致 2. 创建虚拟环境 @@ -63,6 +53,16 @@ - Linux/macOS: `. venv/bin/activate` 4. 安装依赖:`pip install -r requirements.txt` +**方式 B** :[Poetry](https://python-poetry.org/) + +1. 确保 Python 版本与 [pyproject.toml](./pyproject.toml) 中要求的一致 +2. 按[官方文档](https://python-poetry.org/docs/#installation)提示安装 Poetry +3. 创建虚拟环境:`poetry env use /full/path/to/python`(注意替换路径) +4. 安装依赖:`poetry install --no-root --only main` +5. 使用该虚拟环境: `poetry shell`(或在 PyCharm 等 IDE 中配置) + +> 更多 Poetry 使用方法信息,请参阅其[官方文档](https://python-poetry.org/docs/)。 + **方式 C** :其他包管理工具 1. 使用你喜欢的其他工具创建虚拟环境,如 [Pipenv](https://pipenv.pypa.io/)、[Conda](https://www.anaconda.com/) 等 @@ -86,7 +86,7 @@ | [01. HelloWorld - PySide 基本结构](./01-HelloWorld-基本结构) | 新手上路,PySide6 程序的基本结构 | | [02. QtCore - 非GUI的核心功能](./02-QtCore-非GUI的核心功能) | 元对象系统、「信号与槽」通信机制等 | | [03. QtWidgets - 常用控件](./03-QtWidgets-常用控件) | 按钮、输入框、文本编辑器、下拉菜单、滚动条等等常用控件的功能、用法 | -| [04. QtGui - 使用GUI功能扩展QtCore](./04-QtGui-使用GUI功能扩展QtCore) | 位图、字体、颜色、键盘快捷键等、事件 | +| [04. QtGui - 使用GUI功能扩展QtCore](./04-QtGui-使用GUI功能扩展QtCore) | 位图、字体、颜色、键盘快捷键等、事件(暂未完成) | | [05. QtWidgets - 进阶话题](./05-QtWidgets-进阶话题) | 布局管理器、QSS样式、主窗口控件等 | | [06. Model/View - 模型与视图、数据库](./06-ModelView-模型与视图、数据库) | 模型与视图、与数据库交互 | | [07. Packaging - 静态资源编译、打包](./07-Packaging-资源管理与打包) | 将应用程序打包为 `exe`、将静态资源编译至二进制 `qrc` 文件 | @@ -139,6 +139,6 @@ PySide6 Code Tutorial 是一个开源项目,非常期待以及感谢你的参 ## 打赏 -本项目的[主要作者/维护者](https://muzing.top/about/)是一名还没有收入的在校学生,如果本项目对你有帮助,希望可以请他喝一杯冰可乐 :beer:。 +如果本项目对你有帮助,可以请[主要作者/维护者](https://muzing.top/about/)喝一杯冰可乐 :beer:。 -![微信收款码](./Resources/Images/muzing-WeChat-Collection.png) +![微信赞赏码](./Resources/Images/muzing-WeChat-Collection.png) From 1faa029b1fe9c082d4ae7447a2e47d1e0e0815de Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 00:12:29 +0000 Subject: [PATCH 6/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.1.1 → 24.2.0](https://github.com/psf/black/compare/24.1.1...24.2.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f5b689..41549df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/psf/black - rev: 24.1.1 + rev: 24.2.0 hooks: - id: black args: [--config, "./pyproject.toml"]