Skip to content

Commit

Permalink
magicgui version
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed Jun 16, 2024
1 parent 1a47787 commit 241d344
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ authors = [
dependencies = [
"appdirs>=1.4.4",
"collections-undo>=0.0.7",
"magicgui>=0.5.1",
"magicgui>=0.7.0,!=0.8.3",
"matplotlib>=3.1",
"pandas>=1.5.2",
"psygnal>=0.9.0",
Expand Down Expand Up @@ -104,3 +104,9 @@ filterwarnings = [
"ignore:path is deprecated:DeprecationWarning",
"ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
]

[tool.pyright.defineConstant]
PYQT5 = true
PYSIDE2 = false
PYQT6 = false
PYSIDE6 = false
7 changes: 1 addition & 6 deletions tabulous/_magicgui/_color_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
from qtpy import QtWidgets as QtW, QtGui
from qtpy.QtCore import Qt, Signal

from magicgui import __version__ as MAGICGUI_VERSION

if int(MAGICGUI_VERSION.split(".")[1]) >= 7:
from magicgui.widgets.bases import ValueWidget
else:
from magicgui.widgets._bases import ValueWidget
from magicgui.widgets.bases import ValueWidget
from magicgui.backends._qtpy.widgets import QBaseValueWidget
from magicgui.application import use_app

Expand Down
11 changes: 3 additions & 8 deletions tabulous/_magicgui/_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
from qtpy import QtWidgets as QtW, QtCore, QtGui
from qtpy.QtCore import Signal

from magicgui import __version__ as MAGICGUI_VERSION, register_type
from magicgui import register_type

if int(MAGICGUI_VERSION.split(".")[1]) >= 7:
from magicgui.widgets.bases import ValueWidget
from magicgui.types import Undefined
else:
from magicgui.widgets._bases import ValueWidget

Undefined = None
from magicgui.widgets.bases import ValueWidget
from magicgui.types import Undefined

from magicgui.backends._qtpy.widgets import QBaseValueWidget

Expand Down
5 changes: 1 addition & 4 deletions tabulous/_magicgui/_toggle_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
from qtpy import QtWidgets as QtW, QtCore, QtGui
from qtpy.QtCore import Qt, Signal, Property

try:
from magicgui.widgets.bases import ButtonWidget, CategoricalWidget
except ImportError:
from magicgui.widgets._bases import ButtonWidget, CategoricalWidget
from magicgui.widgets.bases import ButtonWidget, CategoricalWidget
from magicgui.backends._qtpy.widgets import (
QBaseButtonWidget,
RadioButtons as RadioButtonsBase,
Expand Down

0 comments on commit 241d344

Please sign in to comment.