isort followed by black
This commit is contained in:
parent
0862ce7fd6
commit
fb873edcb5
56 changed files with 311 additions and 360 deletions
|
|
@ -3,19 +3,17 @@ from __future__ import annotations
|
||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
|
||||||
QLabel,
|
|
||||||
QTextEdit,
|
|
||||||
QDialogButtonBox,
|
QDialogButtonBox,
|
||||||
|
QLabel,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
|
QTextEdit,
|
||||||
|
QVBoxLayout,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
||||||
|
|
||||||
BUG_REPORT_HOST = "https://nr.mig5.net"
|
BUG_REPORT_HOST = "https://nr.mig5.net"
|
||||||
ROUTE = "forms/bouquin/bugs"
|
ROUTE = "forms/bouquin/bugs"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtCore import QSize, QRect, Qt
|
from PySide6.QtCore import QRect, QSize, Qt
|
||||||
from PySide6.QtGui import QPainter, QPalette, QColor, QFont, QFontMetrics
|
from PySide6.QtGui import QColor, QFont, QFontMetrics, QPainter, QPalette
|
||||||
|
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
|
||||||
QVBoxLayout,
|
|
||||||
QPlainTextEdit,
|
|
||||||
QDialogButtonBox,
|
|
||||||
QComboBox,
|
QComboBox,
|
||||||
|
QDialog,
|
||||||
|
QDialogButtonBox,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
QPlainTextEdit,
|
||||||
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from typing import Optional, Dict
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from PySide6.QtGui import QColor, QTextCharFormat, QFont
|
from PySide6.QtGui import QColor, QFont, QTextCharFormat
|
||||||
|
|
||||||
|
|
||||||
class CodeHighlighter:
|
class CodeHighlighter:
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,15 @@ import datetime as _dt
|
||||||
import hashlib
|
import hashlib
|
||||||
import html
|
import html
|
||||||
import json
|
import json
|
||||||
import markdown
|
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from sqlcipher3 import dbapi2 as sqlite
|
from typing import Dict, List, Sequence, Tuple
|
||||||
from sqlcipher3 import Binary
|
|
||||||
from typing import List, Sequence, Tuple, Dict
|
|
||||||
|
|
||||||
|
import markdown
|
||||||
|
from sqlcipher3 import Binary
|
||||||
|
from sqlcipher3 import dbapi2 as sqlite
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ and TagBrowserDialog).
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
from PySide6.QtCore import QUrl
|
from PySide6.QtCore import QUrl
|
||||||
|
|
|
||||||
|
|
@ -5,32 +5,32 @@ from typing import Optional
|
||||||
from PySide6.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide6.QtGui import QColor
|
from PySide6.QtGui import QColor
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
|
||||||
QFormLayout,
|
|
||||||
QComboBox,
|
|
||||||
QLineEdit,
|
|
||||||
QTableWidget,
|
|
||||||
QTableWidgetItem,
|
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QHeaderView,
|
QComboBox,
|
||||||
QPushButton,
|
QDialog,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QMessageBox,
|
QFormLayout,
|
||||||
QWidget,
|
|
||||||
QFrame,
|
QFrame,
|
||||||
QToolButton,
|
QHBoxLayout,
|
||||||
|
QHeaderView,
|
||||||
|
QLineEdit,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
|
QMessageBox,
|
||||||
|
QPushButton,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QStyle,
|
QStyle,
|
||||||
|
QTableWidget,
|
||||||
|
QTableWidgetItem,
|
||||||
|
QToolButton,
|
||||||
|
QVBoxLayout,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from . import strings
|
||||||
from .db import DBManager, DocumentRow
|
from .db import DBManager, DocumentRow
|
||||||
from .settings import load_db_config
|
from .settings import load_db_config
|
||||||
from .time_log import TimeCodeManagerDialog
|
from .time_log import TimeCodeManagerDialog
|
||||||
from . import strings
|
|
||||||
|
|
||||||
|
|
||||||
class TodaysDocumentsWidget(QFrame):
|
class TodaysDocumentsWidget(QFrame):
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,15 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide6.QtGui import (
|
from PySide6.QtGui import QShortcut, QTextCharFormat, QTextCursor, QTextDocument
|
||||||
QShortcut,
|
|
||||||
QTextCursor,
|
|
||||||
QTextCharFormat,
|
|
||||||
QTextDocument,
|
|
||||||
)
|
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QWidget,
|
|
||||||
QHBoxLayout,
|
|
||||||
QLineEdit,
|
|
||||||
QLabel,
|
|
||||||
QPushButton,
|
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
|
QHBoxLayout,
|
||||||
|
QLabel,
|
||||||
|
QLineEdit,
|
||||||
|
QPushButton,
|
||||||
QTextEdit,
|
QTextEdit,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import difflib, re, html as _html
|
import difflib
|
||||||
|
import html as _html
|
||||||
|
import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, Slot
|
from PySide6.QtCore import Qt, Slot
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QAbstractItemView,
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
QPushButton,
|
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QTextBrowser,
|
QPushButton,
|
||||||
QTabWidget,
|
QTabWidget,
|
||||||
QAbstractItemView,
|
QTextBrowser,
|
||||||
|
QVBoxLayout,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
|
||||||
|
|
@ -2,44 +2,39 @@ from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from sqlcipher3 import dbapi2 as sqlite3
|
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QDate, QUrl, Signal
|
from PySide6.QtCore import QDate, Qt, QUrl, Signal
|
||||||
from PySide6.QtGui import (
|
from PySide6.QtGui import QDesktopServices, QImage, QPageLayout, QTextDocument
|
||||||
QImage,
|
|
||||||
QTextDocument,
|
|
||||||
QPageLayout,
|
|
||||||
QDesktopServices,
|
|
||||||
)
|
|
||||||
from PySide6.QtPrintSupport import QPrinter
|
from PySide6.QtPrintSupport import QPrinter
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QAbstractItemView,
|
||||||
QVBoxLayout,
|
QButtonGroup,
|
||||||
QHBoxLayout,
|
QCheckBox,
|
||||||
QFormLayout,
|
|
||||||
QLabel,
|
|
||||||
QLineEdit,
|
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDateEdit,
|
QDateEdit,
|
||||||
QCheckBox,
|
QDialog,
|
||||||
QTextEdit,
|
|
||||||
QTableWidget,
|
|
||||||
QTableWidgetItem,
|
|
||||||
QAbstractItemView,
|
|
||||||
QHeaderView,
|
|
||||||
QPushButton,
|
|
||||||
QRadioButton,
|
|
||||||
QButtonGroup,
|
|
||||||
QDoubleSpinBox,
|
QDoubleSpinBox,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
|
QFormLayout,
|
||||||
|
QHBoxLayout,
|
||||||
|
QHeaderView,
|
||||||
|
QLabel,
|
||||||
|
QLineEdit,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
|
QPushButton,
|
||||||
|
QRadioButton,
|
||||||
|
QTableWidget,
|
||||||
|
QTableWidgetItem,
|
||||||
|
QTextEdit,
|
||||||
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
from sqlcipher3 import dbapi2 as sqlite3
|
||||||
|
|
||||||
|
from . import strings
|
||||||
from .db import DBManager, TimeLogRow
|
from .db import DBManager, TimeLogRow
|
||||||
from .reminders import Reminder, ReminderType
|
from .reminders import Reminder, ReminderType
|
||||||
from .settings import load_db_config
|
from .settings import load_db_config
|
||||||
from . import strings
|
|
||||||
|
|
||||||
|
|
||||||
class InvoiceDetailMode(str, Enum):
|
class InvoiceDetailMode(str, Enum):
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ from pathlib import Path
|
||||||
|
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
QDialogButtonBox,
|
||||||
|
QFileDialog,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QLineEdit,
|
QLineEdit,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QDialogButtonBox,
|
QVBoxLayout,
|
||||||
QFileDialog,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QEvent
|
from PySide6.QtCore import QEvent, Qt
|
||||||
from PySide6.QtWidgets import QWidget, QVBoxLayout, QLabel, QPushButton
|
from PySide6.QtWidgets import QLabel, QPushButton, QVBoxLayout, QWidget
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
from .theme import ThemeManager
|
from .theme import ThemeManager
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,14 @@ from __future__ import annotations
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from PySide6.QtWidgets import QApplication
|
|
||||||
from PySide6.QtGui import QIcon
|
|
||||||
|
|
||||||
from .settings import APP_NAME, APP_ORG, get_settings
|
from PySide6.QtGui import QIcon
|
||||||
from .main_window import MainWindow
|
from PySide6.QtWidgets import QApplication
|
||||||
from .theme import Theme, ThemeConfig, ThemeManager
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
from .main_window import MainWindow
|
||||||
|
from .settings import APP_NAME, APP_ORG, get_settings
|
||||||
|
from .theme import Theme, ThemeConfig, ThemeManager
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,21 @@ from __future__ import annotations
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from PySide6.QtCore import (
|
from PySide6.QtCore import (
|
||||||
QDate,
|
QDate,
|
||||||
QTimer,
|
|
||||||
Qt,
|
|
||||||
QSettings,
|
|
||||||
Slot,
|
|
||||||
QUrl,
|
|
||||||
QEvent,
|
|
||||||
QSignalBlocker,
|
|
||||||
QDateTime,
|
QDateTime,
|
||||||
|
QEvent,
|
||||||
|
QSettings,
|
||||||
|
QSignalBlocker,
|
||||||
|
Qt,
|
||||||
QTime,
|
QTime,
|
||||||
|
QTimer,
|
||||||
|
QUrl,
|
||||||
|
Slot,
|
||||||
)
|
)
|
||||||
from PySide6.QtGui import (
|
from PySide6.QtGui import (
|
||||||
QAction,
|
QAction,
|
||||||
|
|
@ -31,23 +31,24 @@ from PySide6.QtGui import (
|
||||||
QTextListFormat,
|
QTextListFormat,
|
||||||
)
|
)
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QApplication,
|
||||||
QCalendarWidget,
|
QCalendarWidget,
|
||||||
QDialog,
|
QDialog,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
|
QLabel,
|
||||||
QMainWindow,
|
QMainWindow,
|
||||||
QMenu,
|
QMenu,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
|
QPushButton,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QSplitter,
|
QSplitter,
|
||||||
QTableView,
|
QTableView,
|
||||||
QTabWidget,
|
QTabWidget,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
QLabel,
|
|
||||||
QPushButton,
|
|
||||||
QApplication,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from . import strings
|
||||||
from .bug_report_dialog import BugReportDialog
|
from .bug_report_dialog import BugReportDialog
|
||||||
from .db import DBManager
|
from .db import DBManager
|
||||||
from .documents import DocumentsDialog, TodaysDocumentsWidget
|
from .documents import DocumentsDialog, TodaysDocumentsWidget
|
||||||
|
|
@ -60,10 +61,9 @@ from .pomodoro_timer import PomodoroManager
|
||||||
from .reminders import UpcomingRemindersWidget
|
from .reminders import UpcomingRemindersWidget
|
||||||
from .save_dialog import SaveDialog
|
from .save_dialog import SaveDialog
|
||||||
from .search import Search
|
from .search import Search
|
||||||
from .settings import APP_ORG, APP_NAME, load_db_config, save_db_config
|
from .settings import APP_NAME, APP_ORG, load_db_config, save_db_config
|
||||||
from .settings_dialog import SettingsDialog
|
from .settings_dialog import SettingsDialog
|
||||||
from .statistics_dialog import StatisticsDialog
|
from .statistics_dialog import StatisticsDialog
|
||||||
from . import strings
|
|
||||||
from .tags_widget import PageTagsWidget
|
from .tags_widget import PageTagsWidget
|
||||||
from .theme import ThemeManager
|
from .theme import ThemeManager
|
||||||
from .time_log import TimeLogWidget
|
from .time_log import TimeLogWidget
|
||||||
|
|
|
||||||
|
|
@ -5,28 +5,28 @@ import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Tuple
|
from typing import Optional, Tuple
|
||||||
|
|
||||||
|
from PySide6.QtCore import QRect, Qt, QTimer, QUrl
|
||||||
from PySide6.QtGui import (
|
from PySide6.QtGui import (
|
||||||
|
QDesktopServices,
|
||||||
QFont,
|
QFont,
|
||||||
QFontDatabase,
|
QFontDatabase,
|
||||||
QFontMetrics,
|
QFontMetrics,
|
||||||
QImage,
|
QImage,
|
||||||
QMouseEvent,
|
QMouseEvent,
|
||||||
QTextBlock,
|
QTextBlock,
|
||||||
|
QTextBlockFormat,
|
||||||
QTextCharFormat,
|
QTextCharFormat,
|
||||||
QTextCursor,
|
QTextCursor,
|
||||||
QTextDocument,
|
QTextDocument,
|
||||||
QTextFormat,
|
QTextFormat,
|
||||||
QTextBlockFormat,
|
|
||||||
QTextImageFormat,
|
QTextImageFormat,
|
||||||
QDesktopServices,
|
|
||||||
)
|
)
|
||||||
from PySide6.QtCore import Qt, QRect, QTimer, QUrl
|
|
||||||
from PySide6.QtWidgets import QDialog, QTextEdit
|
from PySide6.QtWidgets import QDialog, QTextEdit
|
||||||
|
|
||||||
from .theme import ThemeManager
|
|
||||||
from .markdown_highlighter import MarkdownHighlighter
|
|
||||||
from .code_block_editor_dialog import CodeBlockEditorDialog
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
from .code_block_editor_dialog import CodeBlockEditorDialog
|
||||||
|
from .markdown_highlighter import MarkdownHighlighter
|
||||||
|
from .theme import ThemeManager
|
||||||
|
|
||||||
|
|
||||||
class MarkdownEditor(QTextEdit):
|
class MarkdownEditor(QTextEdit):
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ from PySide6.QtGui import (
|
||||||
QTextDocument,
|
QTextDocument,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .theme import ThemeManager, Theme
|
from .theme import Theme, ThemeManager
|
||||||
|
|
||||||
|
|
||||||
class MarkdownHighlighter(QSyntaxHighlighter):
|
class MarkdownHighlighter(QSyntaxHighlighter):
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ from typing import Optional
|
||||||
from PySide6.QtCore import Qt, QTimer, Signal, Slot
|
from PySide6.QtCore import Qt, QTimer, Signal, Slot
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,30 +4,30 @@ from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QDate, QTime, QDateTime, QTimer, Slot, Signal
|
from PySide6.QtCore import QDate, QDateTime, Qt, QTime, QTimer, Signal, Slot
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QAbstractItemView,
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
|
||||||
QFormLayout,
|
|
||||||
QLineEdit,
|
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QTimeEdit,
|
QDateEdit,
|
||||||
QPushButton,
|
QDialog,
|
||||||
|
QFormLayout,
|
||||||
QFrame,
|
QFrame,
|
||||||
QWidget,
|
QHBoxLayout,
|
||||||
QToolButton,
|
QHeaderView,
|
||||||
|
QLineEdit,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
QStyle,
|
|
||||||
QSizePolicy,
|
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
|
QPushButton,
|
||||||
|
QSizePolicy,
|
||||||
|
QSpinBox,
|
||||||
|
QStyle,
|
||||||
QTableWidget,
|
QTableWidget,
|
||||||
QTableWidgetItem,
|
QTableWidgetItem,
|
||||||
QAbstractItemView,
|
QTimeEdit,
|
||||||
QHeaderView,
|
QToolButton,
|
||||||
QSpinBox,
|
QVBoxLayout,
|
||||||
QDateEdit,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
@ -566,8 +566,8 @@ class UpcomingRemindersWidget(QFrame):
|
||||||
if not selected_items:
|
if not selected_items:
|
||||||
return
|
return
|
||||||
|
|
||||||
from PySide6.QtWidgets import QMenu
|
|
||||||
from PySide6.QtGui import QAction
|
from PySide6.QtGui import QAction
|
||||||
|
from PySide6.QtWidgets import QMenu
|
||||||
|
|
||||||
menu = QMenu(self)
|
menu = QMenu(self)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,7 @@ from __future__ import annotations
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from PySide6.QtGui import QFontMetrics
|
from PySide6.QtGui import QFontMetrics
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QLineEdit, QVBoxLayout
|
||||||
QDialog,
|
|
||||||
QVBoxLayout,
|
|
||||||
QLabel,
|
|
||||||
QLineEdit,
|
|
||||||
QDialogButtonBox,
|
|
||||||
)
|
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ from typing import Iterable, Tuple
|
||||||
from PySide6.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QLineEdit,
|
QLineEdit,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QHBoxLayout,
|
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from PySide6.QtCore import QSettings, QStandardPaths
|
from PySide6.QtCore import QSettings, QStandardPaths
|
||||||
|
|
||||||
from .db import DBConfig
|
from .db import DBConfig
|
||||||
|
|
|
||||||
|
|
@ -2,38 +2,36 @@ from __future__ import annotations
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from PySide6.QtCore import Qt, Slot
|
||||||
|
from PySide6.QtGui import QPalette
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QFrame,
|
QDialogButtonBox,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
|
QFormLayout,
|
||||||
|
QFrame,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QLineEdit,
|
QLineEdit,
|
||||||
QFormLayout,
|
QMessageBox,
|
||||||
QHBoxLayout,
|
|
||||||
QVBoxLayout,
|
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QDialogButtonBox,
|
|
||||||
QRadioButton,
|
QRadioButton,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QSpinBox,
|
QSpinBox,
|
||||||
QMessageBox,
|
|
||||||
QWidget,
|
|
||||||
QTabWidget,
|
QTabWidget,
|
||||||
QTextEdit,
|
QTextEdit,
|
||||||
|
QVBoxLayout,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
from PySide6.QtCore import Qt, Slot
|
|
||||||
from PySide6.QtGui import QPalette
|
|
||||||
|
|
||||||
|
|
||||||
from .db import DBConfig, DBManager
|
|
||||||
from .settings import load_db_config, save_db_config
|
|
||||||
from .theme import Theme
|
|
||||||
from .key_prompt import KeyPrompt
|
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
from .db import DBConfig, DBManager
|
||||||
|
from .key_prompt import KeyPrompt
|
||||||
|
from .settings import load_db_config, save_db_config
|
||||||
|
from .theme import Theme
|
||||||
|
|
||||||
|
|
||||||
class SettingsDialog(QDialog):
|
class SettingsDialog(QDialog):
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,25 @@ from __future__ import annotations
|
||||||
import datetime as _dt
|
import datetime as _dt
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QSize, Signal
|
from PySide6.QtCore import QSize, Qt, Signal
|
||||||
from PySide6.QtGui import QColor, QPainter, QPen, QBrush
|
from PySide6.QtGui import QBrush, QColor, QPainter, QPen
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
|
||||||
QFormLayout,
|
QFormLayout,
|
||||||
QLabel,
|
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QComboBox,
|
QLabel,
|
||||||
QScrollArea,
|
QScrollArea,
|
||||||
QWidget,
|
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
|
QVBoxLayout,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
from .db import DBManager
|
from .db import DBManager
|
||||||
from .settings import load_db_config
|
from .settings import load_db_config
|
||||||
|
|
||||||
|
|
||||||
# ---------- Activity heatmap ----------
|
# ---------- Activity heatmap ----------
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from importlib.resources import files
|
|
||||||
import json
|
import json
|
||||||
|
from importlib.resources import files
|
||||||
|
|
||||||
# Get list of locales
|
# Get list of locales
|
||||||
root = files("bouquin") / "locales"
|
root = files("bouquin") / "locales"
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
from PySide6.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide6.QtGui import QColor
|
from PySide6.QtGui import QColor
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QColorDialog,
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
|
QInputDialog,
|
||||||
|
QLabel,
|
||||||
|
QMessageBox,
|
||||||
|
QPushButton,
|
||||||
QTreeWidget,
|
QTreeWidget,
|
||||||
QTreeWidgetItem,
|
QTreeWidgetItem,
|
||||||
QPushButton,
|
QVBoxLayout,
|
||||||
QLabel,
|
|
||||||
QColorDialog,
|
|
||||||
QMessageBox,
|
|
||||||
QInputDialog,
|
|
||||||
)
|
)
|
||||||
|
from sqlcipher3.dbapi2 import IntegrityError
|
||||||
|
|
||||||
|
from . import strings
|
||||||
from .db import DBManager
|
from .db import DBManager
|
||||||
from .settings import load_db_config
|
from .settings import load_db_config
|
||||||
from . import strings
|
|
||||||
from sqlcipher3.dbapi2 import IntegrityError
|
|
||||||
|
|
||||||
|
|
||||||
class TagBrowserDialog(QDialog):
|
class TagBrowserDialog(QDialog):
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,16 @@ from typing import Optional
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QCompleter,
|
||||||
QFrame,
|
QFrame,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QVBoxLayout,
|
|
||||||
QWidget,
|
|
||||||
QToolButton,
|
|
||||||
QLabel,
|
QLabel,
|
||||||
QLineEdit,
|
QLineEdit,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QStyle,
|
QStyle,
|
||||||
QCompleter,
|
QToolButton,
|
||||||
|
QVBoxLayout,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from PySide6.QtGui import QPalette, QColor, QGuiApplication, QTextCharFormat
|
|
||||||
from PySide6.QtWidgets import QApplication, QCalendarWidget, QWidget
|
|
||||||
from PySide6.QtCore import QObject, Signal, Qt
|
|
||||||
from weakref import WeakSet
|
from weakref import WeakSet
|
||||||
|
|
||||||
|
from PySide6.QtCore import QObject, Qt, Signal
|
||||||
|
from PySide6.QtGui import QColor, QGuiApplication, QPalette, QTextCharFormat
|
||||||
|
from PySide6.QtWidgets import QApplication, QCalendarWidget, QWidget
|
||||||
|
|
||||||
|
|
||||||
class Theme(Enum):
|
class Theme(Enum):
|
||||||
SYSTEM = "system"
|
SYSTEM = "system"
|
||||||
|
|
|
||||||
|
|
@ -2,50 +2,49 @@ from __future__ import annotations
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
import html
|
import html
|
||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from sqlcipher3.dbapi2 import IntegrityError
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QDate, QUrl, Signal
|
from PySide6.QtCore import QDate, Qt, QUrl, Signal
|
||||||
from PySide6.QtGui import QPainter, QColor, QImage, QTextDocument, QPageLayout
|
from PySide6.QtGui import QColor, QImage, QPageLayout, QPainter, QTextDocument
|
||||||
from PySide6.QtPrintSupport import QPrinter
|
from PySide6.QtPrintSupport import QPrinter
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
|
QAbstractItemView,
|
||||||
QCalendarWidget,
|
QCalendarWidget,
|
||||||
|
QComboBox,
|
||||||
|
QCompleter,
|
||||||
|
QDateEdit,
|
||||||
QDialog,
|
QDialog,
|
||||||
QDialogButtonBox,
|
QDialogButtonBox,
|
||||||
QFrame,
|
QDoubleSpinBox,
|
||||||
QVBoxLayout,
|
|
||||||
QHBoxLayout,
|
|
||||||
QWidget,
|
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QFormLayout,
|
QFormLayout,
|
||||||
QLabel,
|
QFrame,
|
||||||
QComboBox,
|
QHBoxLayout,
|
||||||
QLineEdit,
|
|
||||||
QDoubleSpinBox,
|
|
||||||
QPushButton,
|
|
||||||
QTableWidget,
|
|
||||||
QTableWidgetItem,
|
|
||||||
QAbstractItemView,
|
|
||||||
QHeaderView,
|
QHeaderView,
|
||||||
QTabWidget,
|
QInputDialog,
|
||||||
|
QLabel,
|
||||||
|
QLineEdit,
|
||||||
QListWidget,
|
QListWidget,
|
||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
QDateEdit,
|
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QCompleter,
|
QPushButton,
|
||||||
QToolButton,
|
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QStyle,
|
QStyle,
|
||||||
QInputDialog,
|
QTableWidget,
|
||||||
|
QTableWidgetItem,
|
||||||
|
QTabWidget,
|
||||||
|
QToolButton,
|
||||||
|
QVBoxLayout,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
from sqlcipher3.dbapi2 import IntegrityError
|
||||||
|
|
||||||
|
from . import strings
|
||||||
from .db import DBManager
|
from .db import DBManager
|
||||||
from .settings import load_db_config
|
from .settings import load_db_config
|
||||||
from .theme import ThemeManager
|
from .theme import ThemeManager
|
||||||
from . import strings
|
|
||||||
|
|
||||||
|
|
||||||
class TimeLogWidget(QFrame):
|
class TimeLogWidget(QFrame):
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtCore import Signal, Qt
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide6.QtGui import QAction, QKeySequence, QFont, QFontDatabase, QActionGroup
|
from PySide6.QtGui import QAction, QActionGroup, QFont, QFontDatabase, QKeySequence
|
||||||
from PySide6.QtWidgets import QToolBar
|
from PySide6.QtWidgets import QToolBar
|
||||||
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
|
|
||||||
|
|
@ -5,23 +5,17 @@ import os
|
||||||
import re
|
import re
|
||||||
import subprocess # nosec
|
import subprocess # nosec
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from importlib.resources import files
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from importlib.resources import files
|
|
||||||
from PySide6.QtCore import QStandardPaths, Qt
|
from PySide6.QtCore import QStandardPaths, Qt
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtGui import QGuiApplication, QImage, QPainter, QPixmap
|
||||||
QApplication,
|
|
||||||
QMessageBox,
|
|
||||||
QWidget,
|
|
||||||
QProgressDialog,
|
|
||||||
)
|
|
||||||
from PySide6.QtGui import QPixmap, QImage, QPainter, QGuiApplication
|
|
||||||
from PySide6.QtSvg import QSvgRenderer
|
from PySide6.QtSvg import QSvgRenderer
|
||||||
|
from PySide6.QtWidgets import QApplication, QMessageBox, QProgressDialog, QWidget
|
||||||
|
|
||||||
from .settings import APP_NAME
|
|
||||||
from . import strings
|
from . import strings
|
||||||
|
from .settings import APP_NAME
|
||||||
|
|
||||||
# Where to fetch the latest version string from
|
# Where to fetch the latest version string from
|
||||||
VERSION_URL = "https://mig5.net/bouquin/version.txt"
|
VERSION_URL = "https://mig5.net/bouquin/version.txt"
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ def freeze_qt_time(monkeypatch):
|
||||||
QTime.currentTime().addSecs(3600) is still the same calendar day.
|
QTime.currentTime().addSecs(3600) is still the same calendar day.
|
||||||
"""
|
"""
|
||||||
import bouquin.main_window as _mwmod
|
import bouquin.main_window as _mwmod
|
||||||
from PySide6.QtCore import QDate, QTime, QDateTime
|
from PySide6.QtCore import QDate, QDateTime, QTime
|
||||||
|
|
||||||
today = QDate.currentDate()
|
today = QDate.currentDate()
|
||||||
fixed_time = QTime(12, 0)
|
fixed_time = QTime(12, 0)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import bouquin.bug_report_dialog as bugmod
|
import bouquin.bug_report_dialog as bugmod
|
||||||
from bouquin.bug_report_dialog import BugReportDialog
|
|
||||||
from bouquin import strings
|
from bouquin import strings
|
||||||
from PySide6.QtWidgets import QMessageBox
|
from bouquin.bug_report_dialog import BugReportDialog
|
||||||
from PySide6.QtGui import QTextCursor
|
from PySide6.QtGui import QTextCursor
|
||||||
|
from PySide6.QtWidgets import QMessageBox
|
||||||
|
|
||||||
|
|
||||||
def test_bug_report_truncates_text_to_max_chars(qtbot):
|
def test_bug_report_truncates_text_to_max_chars(qtbot):
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
from PySide6.QtWidgets import QPushButton
|
|
||||||
from bouquin import strings
|
from bouquin import strings
|
||||||
|
|
||||||
from PySide6.QtCore import QRect, QSize
|
|
||||||
from PySide6.QtGui import QPaintEvent, QFont
|
|
||||||
|
|
||||||
from bouquin.code_block_editor_dialog import (
|
from bouquin.code_block_editor_dialog import (
|
||||||
CodeBlockEditorDialog,
|
CodeBlockEditorDialog,
|
||||||
CodeEditorWithLineNumbers,
|
CodeEditorWithLineNumbers,
|
||||||
)
|
)
|
||||||
|
from PySide6.QtCore import QRect, QSize
|
||||||
|
from PySide6.QtGui import QFont, QPaintEvent
|
||||||
|
from PySide6.QtWidgets import QPushButton
|
||||||
|
|
||||||
|
|
||||||
def _find_button_by_text(widget, text):
|
def _find_button_by_text(widget, text):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
from bouquin.code_highlighter import CodeHighlighter, CodeBlockMetadata
|
from bouquin.code_highlighter import CodeBlockMetadata, CodeHighlighter
|
||||||
from PySide6.QtGui import QTextCharFormat, QFont
|
from PySide6.QtGui import QFont, QTextCharFormat
|
||||||
|
|
||||||
|
|
||||||
def test_get_language_patterns_python(app):
|
def test_get_language_patterns_python(app):
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
import pytest
|
import csv
|
||||||
import json, csv
|
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
from sqlcipher3 import dbapi2 as sqlite
|
import json
|
||||||
from bouquin.db import DBManager
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from bouquin.db import DBManager
|
||||||
|
from sqlcipher3 import dbapi2 as sqlite
|
||||||
|
|
||||||
|
|
||||||
def _today():
|
def _today():
|
||||||
return dt.date.today().isoformat()
|
return dt.date.today().isoformat()
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
from unittest.mock import patch
|
|
||||||
from pathlib import Path
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
from PySide6.QtCore import QUrl
|
from PySide6.QtCore import QUrl
|
||||||
from PySide6.QtWidgets import QMessageBox, QWidget
|
|
||||||
from PySide6.QtGui import QDesktopServices
|
from PySide6.QtGui import QDesktopServices
|
||||||
|
from PySide6.QtWidgets import QMessageBox, QWidget
|
||||||
|
|
||||||
|
|
||||||
def test_open_document_from_db_success(qtbot, app, fresh_db):
|
def test_open_document_from_db_success(qtbot, app, fresh_db):
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
from unittest.mock import patch, MagicMock
|
|
||||||
from pathlib import Path
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from pathlib import Path
|
||||||
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
from bouquin.db import DBConfig
|
from bouquin.db import DBConfig
|
||||||
from bouquin.documents import TodaysDocumentsWidget, DocumentsDialog
|
from bouquin.documents import DocumentsDialog, TodaysDocumentsWidget
|
||||||
from PySide6.QtCore import Qt, QUrl
|
from PySide6.QtCore import Qt, QUrl
|
||||||
from PySide6.QtWidgets import QMessageBox, QDialog, QFileDialog
|
|
||||||
from PySide6.QtGui import QDesktopServices
|
from PySide6.QtGui import QDesktopServices
|
||||||
|
from PySide6.QtWidgets import QDialog, QFileDialog, QMessageBox
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# TodaysDocumentsWidget Tests
|
# TodaysDocumentsWidget Tests
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from bouquin.find_bar import FindBar
|
||||||
|
from bouquin.markdown_editor import MarkdownEditor
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from PySide6.QtGui import QTextCursor
|
from PySide6.QtGui import QTextCursor
|
||||||
from PySide6.QtWidgets import QTextEdit, QWidget
|
from PySide6.QtWidgets import QTextEdit, QWidget
|
||||||
from bouquin.markdown_editor import MarkdownEditor
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
|
||||||
from bouquin.find_bar import FindBar
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
from PySide6.QtWidgets import QWidget, QMessageBox, QApplication
|
|
||||||
from PySide6.QtCore import Qt, QTimer
|
|
||||||
|
|
||||||
from bouquin.history_dialog import HistoryDialog
|
from bouquin.history_dialog import HistoryDialog
|
||||||
|
from PySide6.QtCore import Qt, QTimer
|
||||||
|
from PySide6.QtWidgets import QApplication, QMessageBox, QWidget
|
||||||
|
|
||||||
|
|
||||||
def test_history_dialog_lists_and_revert(qtbot, fresh_db):
|
def test_history_dialog_lists_and_revert(qtbot, fresh_db):
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
import pytest
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QDate
|
import pytest
|
||||||
from PySide6.QtWidgets import QMessageBox
|
|
||||||
|
|
||||||
from bouquin.invoices import (
|
from bouquin.invoices import (
|
||||||
InvoiceDetailMode,
|
|
||||||
InvoiceLineItem,
|
|
||||||
_invoice_due_reminder_text,
|
|
||||||
InvoiceDialog,
|
|
||||||
InvoicesDialog,
|
|
||||||
_INVOICE_REMINDER_TIME,
|
_INVOICE_REMINDER_TIME,
|
||||||
|
InvoiceDetailMode,
|
||||||
|
InvoiceDialog,
|
||||||
|
InvoiceLineItem,
|
||||||
|
InvoicesDialog,
|
||||||
|
_invoice_due_reminder_text,
|
||||||
)
|
)
|
||||||
from bouquin.reminders import Reminder, ReminderType
|
from bouquin.reminders import Reminder, ReminderType
|
||||||
|
from PySide6.QtCore import QDate, Qt
|
||||||
|
from PySide6.QtWidgets import QMessageBox
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Tests for InvoiceDetailMode enum
|
# Tests for InvoiceDetailMode enum
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
from bouquin.key_prompt import KeyPrompt
|
from bouquin.key_prompt import KeyPrompt
|
||||||
|
|
||||||
from PySide6.QtCore import QTimer
|
from PySide6.QtCore import QTimer
|
||||||
from PySide6.QtWidgets import QFileDialog, QLineEdit
|
from PySide6.QtWidgets import QFileDialog, QLineEdit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
from bouquin.lock_overlay import LockOverlay
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from PySide6.QtCore import QEvent
|
from PySide6.QtCore import QEvent
|
||||||
from PySide6.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget
|
||||||
from bouquin.lock_overlay import LockOverlay
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
|
||||||
|
|
||||||
|
|
||||||
def test_lock_overlay_reacts_to_theme(app, qtbot):
|
def test_lock_overlay_reacts_to_theme(app, qtbot):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import importlib
|
import importlib
|
||||||
import runpy
|
import runpy
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,19 @@
|
||||||
import pytest
|
|
||||||
import importlib.metadata
|
import importlib.metadata
|
||||||
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import bouquin.main_window as mwmod
|
|
||||||
from bouquin.main_window import MainWindow
|
|
||||||
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
|
||||||
from bouquin.settings import get_settings
|
|
||||||
from bouquin.key_prompt import KeyPrompt
|
|
||||||
from bouquin.db import DBConfig, DBManager
|
|
||||||
from PySide6.QtCore import QEvent, QDate, QTimer, Qt, QPoint, QRect
|
|
||||||
from PySide6.QtWidgets import QTableView, QApplication, QWidget, QMessageBox, QDialog
|
|
||||||
from PySide6.QtGui import QMouseEvent, QKeyEvent, QTextCursor, QCloseEvent
|
|
||||||
|
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
|
import bouquin.main_window as mwmod
|
||||||
import bouquin.version_check as version_check
|
import bouquin.version_check as version_check
|
||||||
|
import pytest
|
||||||
|
from bouquin.db import DBConfig, DBManager
|
||||||
|
from bouquin.key_prompt import KeyPrompt
|
||||||
|
from bouquin.main_window import MainWindow
|
||||||
|
from bouquin.settings import get_settings
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
|
from PySide6.QtCore import QDate, QEvent, QPoint, QRect, Qt, QTimer
|
||||||
|
from PySide6.QtGui import QCloseEvent, QKeyEvent, QMouseEvent, QTextCursor
|
||||||
|
from PySide6.QtWidgets import QApplication, QDialog, QMessageBox, QTableView, QWidget
|
||||||
|
|
||||||
|
|
||||||
def test_main_window_loads_and_saves(qtbot, app, tmp_db_cfg, fresh_db):
|
def test_main_window_loads_and_saves(qtbot, app, tmp_db_cfg, fresh_db):
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QPoint, QMimeData, QUrl
|
|
||||||
from PySide6.QtGui import (
|
|
||||||
QImage,
|
|
||||||
QColor,
|
|
||||||
QKeyEvent,
|
|
||||||
QTextCursor,
|
|
||||||
QTextDocument,
|
|
||||||
QFont,
|
|
||||||
QTextCharFormat,
|
|
||||||
)
|
|
||||||
from PySide6.QtWidgets import QApplication, QTextEdit
|
|
||||||
|
|
||||||
from bouquin.markdown_editor import MarkdownEditor
|
from bouquin.markdown_editor import MarkdownEditor
|
||||||
from bouquin.markdown_highlighter import MarkdownHighlighter
|
from bouquin.markdown_highlighter import MarkdownHighlighter
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
|
from PySide6.QtCore import QMimeData, QPoint, Qt, QUrl
|
||||||
|
from PySide6.QtGui import (
|
||||||
|
QColor,
|
||||||
|
QFont,
|
||||||
|
QImage,
|
||||||
|
QKeyEvent,
|
||||||
|
QTextCharFormat,
|
||||||
|
QTextCursor,
|
||||||
|
QTextDocument,
|
||||||
|
)
|
||||||
|
from PySide6.QtWidgets import QApplication, QTextEdit
|
||||||
|
|
||||||
|
|
||||||
def _today():
|
def _today():
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,18 @@ These tests should be added to test_markdown_editor.py.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from PySide6.QtCore import Qt, QPoint
|
from bouquin.markdown_editor import MarkdownEditor
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
|
from PySide6.QtCore import QPoint, Qt
|
||||||
from PySide6.QtGui import (
|
from PySide6.QtGui import (
|
||||||
QImage,
|
|
||||||
QColor,
|
QColor,
|
||||||
|
QImage,
|
||||||
QKeyEvent,
|
QKeyEvent,
|
||||||
|
QMouseEvent,
|
||||||
QTextCursor,
|
QTextCursor,
|
||||||
QTextDocument,
|
QTextDocument,
|
||||||
QMouseEvent,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from bouquin.markdown_editor import MarkdownEditor
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
|
||||||
|
|
||||||
|
|
||||||
def text(editor) -> str:
|
def text(editor) -> str:
|
||||||
return editor.toPlainText()
|
return editor.toPlainText()
|
||||||
|
|
@ -145,8 +144,8 @@ def test_edit_code_block_checks_document(app, qtbot):
|
||||||
|
|
||||||
def test_edit_code_block_dialog_cancelled(editor, qtbot, monkeypatch):
|
def test_edit_code_block_dialog_cancelled(editor, qtbot, monkeypatch):
|
||||||
"""Test _edit_code_block when dialog is cancelled."""
|
"""Test _edit_code_block when dialog is cancelled."""
|
||||||
from PySide6.QtWidgets import QDialog
|
|
||||||
import bouquin.markdown_editor as markdown_editor
|
import bouquin.markdown_editor as markdown_editor
|
||||||
|
from PySide6.QtWidgets import QDialog
|
||||||
|
|
||||||
class CancelledDialog:
|
class CancelledDialog:
|
||||||
def __init__(self, code, language, parent=None, allow_delete=False):
|
def __init__(self, code, language, parent=None, allow_delete=False):
|
||||||
|
|
@ -175,8 +174,8 @@ def test_edit_code_block_dialog_cancelled(editor, qtbot, monkeypatch):
|
||||||
|
|
||||||
def test_edit_code_block_with_delete(editor, qtbot, monkeypatch):
|
def test_edit_code_block_with_delete(editor, qtbot, monkeypatch):
|
||||||
"""Test _edit_code_block when user deletes the block."""
|
"""Test _edit_code_block when user deletes the block."""
|
||||||
from PySide6.QtWidgets import QDialog
|
|
||||||
import bouquin.markdown_editor as markdown_editor
|
import bouquin.markdown_editor as markdown_editor
|
||||||
|
from PySide6.QtWidgets import QDialog
|
||||||
|
|
||||||
class DeleteDialog:
|
class DeleteDialog:
|
||||||
def __init__(self, code, language, parent=None, allow_delete=False):
|
def __init__(self, code, language, parent=None, allow_delete=False):
|
||||||
|
|
@ -214,8 +213,8 @@ def test_edit_code_block_with_delete(editor, qtbot, monkeypatch):
|
||||||
|
|
||||||
def test_edit_code_block_language_change(editor, qtbot, monkeypatch):
|
def test_edit_code_block_language_change(editor, qtbot, monkeypatch):
|
||||||
"""Test _edit_code_block with language change."""
|
"""Test _edit_code_block with language change."""
|
||||||
from PySide6.QtWidgets import QDialog
|
|
||||||
import bouquin.markdown_editor as markdown_editor
|
import bouquin.markdown_editor as markdown_editor
|
||||||
|
from PySide6.QtWidgets import QDialog
|
||||||
|
|
||||||
class LanguageChangeDialog:
|
class LanguageChangeDialog:
|
||||||
def __init__(self, code, language, parent=None, allow_delete=False):
|
def __init__(self, code, language, parent=None, allow_delete=False):
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
from bouquin.pomodoro_timer import PomodoroTimer, PomodoroManager
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
from bouquin.pomodoro_timer import PomodoroManager, PomodoroTimer
|
||||||
from PySide6.QtWidgets import QWidget, QVBoxLayout, QToolBar, QLabel
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from PySide6.QtGui import QAction
|
from PySide6.QtGui import QAction
|
||||||
|
from PySide6.QtWidgets import QLabel, QToolBar, QVBoxLayout, QWidget
|
||||||
|
|
||||||
|
|
||||||
class DummyTimeLogWidget(QWidget):
|
class DummyTimeLogWidget(QWidget):
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
import pytest
|
|
||||||
|
|
||||||
from unittest.mock import patch, MagicMock
|
|
||||||
from bouquin.reminders import (
|
|
||||||
Reminder,
|
|
||||||
ReminderType,
|
|
||||||
ReminderDialog,
|
|
||||||
UpcomingRemindersWidget,
|
|
||||||
ManageRemindersDialog,
|
|
||||||
)
|
|
||||||
from PySide6.QtCore import QDateTime, QDate, QTime
|
|
||||||
from PySide6.QtWidgets import QDialog, QMessageBox, QWidget
|
|
||||||
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
|
from unittest.mock import MagicMock, patch
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from bouquin.reminders import (
|
||||||
|
ManageRemindersDialog,
|
||||||
|
Reminder,
|
||||||
|
ReminderDialog,
|
||||||
|
ReminderType,
|
||||||
|
UpcomingRemindersWidget,
|
||||||
|
)
|
||||||
|
from PySide6.QtCore import QDate, QDateTime, QTime
|
||||||
|
from PySide6.QtWidgets import QDialog, QMessageBox, QWidget
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
@ -851,9 +850,9 @@ def test_edit_reminder_dialog(qtbot, fresh_db):
|
||||||
def test_upcoming_reminders_context_menu_shows(
|
def test_upcoming_reminders_context_menu_shows(
|
||||||
qtbot, app, fresh_db, freeze_reminders_time, monkeypatch
|
qtbot, app, fresh_db, freeze_reminders_time, monkeypatch
|
||||||
):
|
):
|
||||||
from PySide6 import QtWidgets, QtGui
|
|
||||||
from PySide6.QtCore import QPoint
|
|
||||||
from bouquin.reminders import Reminder, ReminderType, UpcomingRemindersWidget
|
from bouquin.reminders import Reminder, ReminderType, UpcomingRemindersWidget
|
||||||
|
from PySide6 import QtGui, QtWidgets
|
||||||
|
from PySide6.QtCore import QPoint
|
||||||
|
|
||||||
# Add a future reminder for today
|
# Add a future reminder for today
|
||||||
r = Reminder(
|
r = Reminder(
|
||||||
|
|
@ -909,9 +908,9 @@ def test_upcoming_reminders_context_menu_shows(
|
||||||
def test_upcoming_reminders_delete_selected_dedupes(
|
def test_upcoming_reminders_delete_selected_dedupes(
|
||||||
qtbot, app, fresh_db, freeze_reminders_time, monkeypatch
|
qtbot, app, fresh_db, freeze_reminders_time, monkeypatch
|
||||||
):
|
):
|
||||||
from PySide6.QtWidgets import QMessageBox
|
|
||||||
from PySide6.QtCore import QItemSelectionModel
|
|
||||||
from bouquin.reminders import Reminder, ReminderType, UpcomingRemindersWidget
|
from bouquin.reminders import Reminder, ReminderType, UpcomingRemindersWidget
|
||||||
|
from PySide6.QtCore import QItemSelectionModel
|
||||||
|
from PySide6.QtWidgets import QMessageBox
|
||||||
|
|
||||||
r = Reminder(
|
r = Reminder(
|
||||||
id=None,
|
id=None,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
from bouquin.settings import (
|
|
||||||
get_settings,
|
|
||||||
load_db_config,
|
|
||||||
save_db_config,
|
|
||||||
)
|
|
||||||
from bouquin.db import DBConfig
|
from bouquin.db import DBConfig
|
||||||
|
from bouquin.settings import get_settings, load_db_config, save_db_config
|
||||||
|
|
||||||
|
|
||||||
def _clear_db_settings():
|
def _clear_db_settings():
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
from bouquin.db import DBManager, DBConfig
|
|
||||||
from bouquin.key_prompt import KeyPrompt
|
|
||||||
import bouquin.settings_dialog as sd
|
import bouquin.settings_dialog as sd
|
||||||
from bouquin.settings_dialog import SettingsDialog
|
from bouquin.db import DBConfig, DBManager
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
from bouquin.key_prompt import KeyPrompt
|
||||||
from bouquin.settings import get_settings
|
from bouquin.settings import get_settings
|
||||||
|
from bouquin.settings_dialog import SettingsDialog
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from PySide6.QtCore import QTimer
|
from PySide6.QtCore import QTimer
|
||||||
from PySide6.QtWidgets import QApplication, QMessageBox, QWidget, QDialog
|
from PySide6.QtWidgets import QApplication, QDialog, QMessageBox, QWidget
|
||||||
|
|
||||||
|
|
||||||
def test_settings_dialog_config_roundtrip(qtbot, tmp_db_cfg, fresh_db):
|
def test_settings_dialog_config_roundtrip(qtbot, tmp_db_cfg, fresh_db):
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
import datetime as _dt
|
import datetime as _dt
|
||||||
from datetime import datetime, timedelta, date
|
from datetime import date, datetime, timedelta
|
||||||
|
|
||||||
from bouquin import strings
|
from bouquin import strings
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, QPoint, QDate
|
|
||||||
from PySide6.QtWidgets import QLabel, QWidget
|
|
||||||
from PySide6.QtTest import QTest
|
|
||||||
|
|
||||||
from bouquin.statistics_dialog import DateHeatmap, StatisticsDialog
|
from bouquin.statistics_dialog import DateHeatmap, StatisticsDialog
|
||||||
|
from PySide6.QtCore import QDate, QPoint, Qt
|
||||||
|
from PySide6.QtTest import QTest
|
||||||
|
from PySide6.QtWidgets import QLabel, QWidget
|
||||||
|
|
||||||
|
|
||||||
class FakeStatsDB:
|
class FakeStatsDB:
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
import types
|
import types
|
||||||
from PySide6.QtWidgets import QFileDialog
|
|
||||||
from PySide6.QtGui import QTextCursor
|
|
||||||
|
|
||||||
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
|
||||||
from bouquin.settings import get_settings
|
|
||||||
from bouquin.main_window import MainWindow
|
|
||||||
from bouquin.history_dialog import HistoryDialog
|
from bouquin.history_dialog import HistoryDialog
|
||||||
|
from bouquin.main_window import MainWindow
|
||||||
|
from bouquin.settings import get_settings
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
|
from PySide6.QtGui import QTextCursor
|
||||||
|
from PySide6.QtWidgets import QFileDialog
|
||||||
|
|
||||||
|
|
||||||
def test_tabs_open_and_deduplicate(qtbot, app, tmp_db_cfg, fresh_db):
|
def test_tabs_open_and_deduplicate(qtbot, app, tmp_db_cfg, fresh_db):
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,21 @@
|
||||||
|
import bouquin.strings as strings
|
||||||
import pytest
|
import pytest
|
||||||
|
from bouquin.db import DBManager
|
||||||
from PySide6.QtCore import Qt, QPoint, QEvent, QDate
|
from bouquin.flow_layout import FlowLayout
|
||||||
from PySide6.QtGui import QMouseEvent, QColor
|
from bouquin.strings import load_strings
|
||||||
|
from bouquin.tag_browser import TagBrowserDialog
|
||||||
|
from bouquin.tags_widget import PageTagsWidget, TagChip
|
||||||
|
from PySide6.QtCore import QDate, QEvent, QPoint, Qt
|
||||||
|
from PySide6.QtGui import QColor, QMouseEvent
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QApplication,
|
QApplication,
|
||||||
QMessageBox,
|
|
||||||
QInputDialog,
|
|
||||||
QColorDialog,
|
QColorDialog,
|
||||||
QDialog,
|
QDialog,
|
||||||
|
QInputDialog,
|
||||||
|
QMessageBox,
|
||||||
)
|
)
|
||||||
from bouquin.db import DBManager
|
|
||||||
from bouquin.strings import load_strings
|
|
||||||
from bouquin.tags_widget import PageTagsWidget, TagChip
|
|
||||||
from bouquin.tag_browser import TagBrowserDialog
|
|
||||||
from bouquin.flow_layout import FlowLayout
|
|
||||||
from sqlcipher3.dbapi2 import IntegrityError
|
from sqlcipher3.dbapi2 import IntegrityError
|
||||||
|
|
||||||
import bouquin.strings as strings
|
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# DB Layer Tag Tests
|
# DB Layer Tag Tests
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
@ -1649,7 +1646,7 @@ def test_default_tag_colour_none(fresh_db):
|
||||||
|
|
||||||
def test_flow_layout_take_at_invalid_index(app):
|
def test_flow_layout_take_at_invalid_index(app):
|
||||||
"""Test FlowLayout.takeAt with out-of-bounds index"""
|
"""Test FlowLayout.takeAt with out-of-bounds index"""
|
||||||
from PySide6.QtWidgets import QWidget, QLabel
|
from PySide6.QtWidgets import QLabel, QWidget
|
||||||
|
|
||||||
widget = QWidget()
|
widget = QWidget()
|
||||||
layout = FlowLayout(widget)
|
layout = FlowLayout(widget)
|
||||||
|
|
@ -1673,7 +1670,7 @@ def test_flow_layout_take_at_invalid_index(app):
|
||||||
|
|
||||||
def test_flow_layout_take_at_boundary(app):
|
def test_flow_layout_take_at_boundary(app):
|
||||||
"""Test FlowLayout.takeAt at exact boundary"""
|
"""Test FlowLayout.takeAt at exact boundary"""
|
||||||
from PySide6.QtWidgets import QWidget, QLabel
|
from PySide6.QtWidgets import QLabel, QWidget
|
||||||
|
|
||||||
widget = QWidget()
|
widget = QWidget()
|
||||||
layout = FlowLayout(widget)
|
layout = FlowLayout(widget)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from PySide6.QtGui import QPalette
|
from PySide6.QtGui import QPalette
|
||||||
from PySide6.QtWidgets import QApplication, QCalendarWidget, QWidget
|
from PySide6.QtWidgets import QApplication, QCalendarWidget, QWidget
|
||||||
|
|
||||||
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
|
||||||
|
|
||||||
|
|
||||||
def test_theme_manager_apply_light_and_dark(app):
|
def test_theme_manager_apply_light_and_dark(app):
|
||||||
cfg = ThemeConfig(theme=Theme.LIGHT)
|
cfg = ThemeConfig(theme=Theme.LIGHT)
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,18 @@
|
||||||
import pytest
|
|
||||||
from datetime import date, timedelta
|
from datetime import date, timedelta
|
||||||
from PySide6.QtCore import Qt, QDate
|
from unittest.mock import MagicMock, patch
|
||||||
from PySide6.QtWidgets import (
|
|
||||||
QMessageBox,
|
|
||||||
QInputDialog,
|
|
||||||
QFileDialog,
|
|
||||||
QDialog,
|
|
||||||
)
|
|
||||||
from sqlcipher3.dbapi2 import IntegrityError
|
|
||||||
|
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
import bouquin.strings as strings
|
||||||
|
import pytest
|
||||||
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from bouquin.time_log import (
|
from bouquin.time_log import (
|
||||||
TimeLogWidget,
|
|
||||||
TimeLogDialog,
|
|
||||||
TimeCodeManagerDialog,
|
TimeCodeManagerDialog,
|
||||||
|
TimeLogDialog,
|
||||||
|
TimeLogWidget,
|
||||||
TimeReportDialog,
|
TimeReportDialog,
|
||||||
)
|
)
|
||||||
import bouquin.strings as strings
|
from PySide6.QtCore import QDate, Qt
|
||||||
|
from PySide6.QtWidgets import QDialog, QFileDialog, QInputDialog, QMessageBox
|
||||||
from unittest.mock import patch, MagicMock
|
from sqlcipher3.dbapi2 import IntegrityError
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import pytest
|
import pytest
|
||||||
from PySide6.QtWidgets import QWidget
|
|
||||||
from bouquin.markdown_editor import MarkdownEditor
|
from bouquin.markdown_editor import MarkdownEditor
|
||||||
from bouquin.theme import ThemeManager, ThemeConfig, Theme
|
from bouquin.theme import Theme, ThemeConfig, ThemeManager
|
||||||
from bouquin.toolbar import ToolBar
|
from bouquin.toolbar import ToolBar
|
||||||
|
from PySide6.QtWidgets import QWidget
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
import pytest
|
|
||||||
from unittest.mock import Mock, patch
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
|
import pytest
|
||||||
from bouquin.version_check import VersionChecker
|
from bouquin.version_check import VersionChecker
|
||||||
from PySide6.QtWidgets import QMessageBox, QWidget
|
|
||||||
from PySide6.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
|
from PySide6.QtWidgets import QMessageBox, QWidget
|
||||||
|
|
||||||
|
|
||||||
def test_version_checker_init(app):
|
def test_version_checker_init(app):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue