Skip to content
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

style: format code with isort #110

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hpyc_cli/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from hpyc_core import Core
import os

from hpyc_core import Core

VERSION = "V1.0.1"
yes = ("y", "Y", "YES", "Yes", "yes", "true", "True", "是", "确认")
instance_core = Core()
Expand Down
8 changes: 4 additions & 4 deletions hpyc_core/hpyc_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
"""创建core"""
import os
import sys
import atexit
import importlib
import os
import sys
from queue import Queue
from typing import Optional, Any
from types import ModuleType
from typing import Any, Optional

from hpyculator import _message_queue
from hpyculator.hpysettings import SettingsFileObject # 类型标志用

from ._calculate import CalculationManager
from ._plugin import instance_plugin_manager # 插件管理
from ._settings import hpysettings
from ._calculate import CalculationManager
from .data_structure import MetadataDict

# _instance_settings_file: Optional[SettingsFileObject] = None
Expand Down
2 changes: 1 addition & 1 deletion hpyc_core/hpyc_core/_calculate/calculate_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import hpyculator as hpyc

from .. import _message_queue
from ..data_structure import MetadataDict
from .._plugin import instance_plugin_manager
from ..data_structure import MetadataDict


class CalculationManager:
Expand Down
3 changes: 2 additions & 1 deletion hpyc_core/hpyc_core/_data_structure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import TypedDict, Literal
from typing import Literal, TypedDict

import hpyculator as hpyc


Expand Down
2 changes: 1 addition & 1 deletion hpyc_core/hpyc_core/_plugin/plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import traceback
from types import ModuleType
from typing import Generator, Any
from typing import Any, Generator

import hpyculator as hpyc

Expand Down
5 changes: 3 additions & 2 deletions hpyc_pyside_ui/Plugin/pluperfect_digital_invariant_hz.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hpyculator as hpyc
from typing import Generator
import math
from typing import Generator

import hpyculator as hpyc

NAME = "自幂数计算"
AUTHOR = "HowieHz" or ["HowieHz", ""]
Expand Down
3 changes: 2 additions & 1 deletion hpyc_pyside_ui/Plugin/statistics_hz.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hpyculator as hpyc
import statistics as st

import hpyculator as hpyc

VERSION = "V1.2.1"
PLUGIN_METADATA = {
"input_mode": hpyc.STRING,
Expand Down
1 change: 0 additions & 1 deletion hpyc_pyside_ui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys

from PySide6.QtWidgets import QApplication

from utils import CreateApp

if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions hpyc_pyside_ui/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""运行主程序和主程序的一些初始化"""
import os

from .ui_manager import MainWinApp # 窗口管理类(用于管理设置的窗口)
from .var import instance_core

Expand Down
55 changes: 10 additions & 45 deletions hpyc_pyside_ui/utils/ui/about_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,16 @@
# WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (
QCoreApplication,
QDate,
QDateTime,
QLocale,
QMetaObject,
QObject,
QPoint,
QRect,
QSize,
Qt,
QTime,
QUrl,
)
from PySide6.QtGui import (
QBrush,
QColor,
QConicalGradient,
QCursor,
QFont,
QFontDatabase,
QGradient,
QIcon,
QImage,
QKeySequence,
QLinearGradient,
QPainter,
QPalette,
QPixmap,
QRadialGradient,
QTransform,
)
from PySide6.QtWidgets import (
QApplication,
QComboBox,
QDialog,
QGridLayout,
QHBoxLayout,
QLabel,
QPushButton,
QSizePolicy,
QSpacerItem,
QTextBrowser,
QWidget,
)
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect, QSize, Qt,
QTime, QUrl)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QGradient, QIcon, QImage,
QKeySequence, QLinearGradient, QPainter, QPalette,
QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QComboBox, QDialog, QGridLayout,
QHBoxLayout, QLabel, QPushButton, QSizePolicy,
QSpacerItem, QTextBrowser, QWidget)


class Ui_AboutWin(object):
Expand Down
60 changes: 12 additions & 48 deletions hpyc_pyside_ui/utils/ui/main_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,18 @@
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (
QCoreApplication,
QDate,
QDateTime,
QLocale,
QMetaObject,
QObject,
QPoint,
QRect,
QSize,
QTime,
QUrl,
Qt,
)
from PySide6.QtGui import (
QBrush,
QColor,
QConicalGradient,
QCursor,
QFont,
QFontDatabase,
QGradient,
QIcon,
QImage,
QKeySequence,
QLinearGradient,
QPainter,
QPalette,
QPixmap,
QRadialGradient,
QTransform,
)
from PySide6.QtWidgets import (
QApplication,
QCheckBox,
QFrame,
QGridLayout,
QHBoxLayout,
QLabel,
QListWidget,
QListWidgetItem,
QPlainTextEdit,
QPushButton,
QSizePolicy,
QSpacerItem,
QVBoxLayout,
QWidget,
)
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect, QSize, Qt,
QTime, QUrl)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QGradient, QIcon, QImage,
QKeySequence, QLinearGradient, QPainter, QPalette,
QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QFrame, QGridLayout,
QHBoxLayout, QLabel, QListWidget,
QListWidgetItem, QPlainTextEdit, QPushButton,
QSizePolicy, QSpacerItem, QVBoxLayout, QWidget)

from . import main_window_resource_rc


Expand Down
54 changes: 10 additions & 44 deletions hpyc_pyside_ui/utils/ui/settings_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,16 @@
# WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (
QCoreApplication,
QDate,
QDateTime,
QLocale,
QMetaObject,
QObject,
QPoint,
QRect,
QSize,
Qt,
QTime,
QUrl,
)
from PySide6.QtGui import (
QBrush,
QColor,
QConicalGradient,
QCursor,
QFont,
QFontDatabase,
QGradient,
QIcon,
QImage,
QKeySequence,
QLinearGradient,
QPainter,
QPalette,
QPixmap,
QRadialGradient,
QTransform,
)
from PySide6.QtWidgets import (
QApplication,
QCheckBox,
QComboBox,
QDialog,
QHBoxLayout,
QLabel,
QPushButton,
QSizePolicy,
QTextEdit,
QWidget,
)
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
QMetaObject, QObject, QPoint, QRect, QSize, Qt,
QTime, QUrl)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QGradient, QIcon, QImage,
QKeySequence, QLinearGradient, QPainter, QPalette,
QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog,
QHBoxLayout, QLabel, QPushButton, QSizePolicy,
QTextEdit, QWidget)


class Ui_SettingsWin(object):
Expand Down
15 changes: 8 additions & 7 deletions hpyc_pyside_ui/utils/ui_manager/main_win_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
import pathlib
import time
from dataclasses import dataclass
from typing import Any, Optional
from queue import Queue
from threading import Thread
from typing import Any, Optional

import hpyculator as hpyc
from hpyculator import SettingsFileObject
from PySide6.QtCore import Qt
from PySide6.QtGui import QBrush, QGuiApplication, QPalette, QPixmap, QTextCursor
from PySide6.QtGui import (QBrush, QGuiApplication, QPalette, QPixmap,
QTextCursor)
from qframelesswindow import FramelessWindow

from .signal import instance_main_win_signal
from .about_win_manager import AboutWinApp
from .settings_win_manager import SettingsWinApp # 窗口管理类(用于管理设置的窗口)
from .. import document as doc
from ..var import instance_core
from qframelesswindow import FramelessWindow
from ..ui import Ui_MainWin
from ..var import instance_core
from .about_win_manager import AboutWinApp
from .settings_win_manager import SettingsWinApp # 窗口管理类(用于管理设置的窗口)
from .signal import instance_main_win_signal


@dataclass
Expand Down
Loading