2020import lzma
2121import bz2
2222import zipfile
23-
24- from Orange .widgets .settings import PerfectDomainContextHandler
25- from Orange .widgets .utils .itemdelegates import TableDataDelegate
2623from itertools import chain
2724
2825from xml .sax .saxutils import escape
3936 Qt , QFileInfo , QTimer , QSettings , QObject , QSize , QMimeDatabase , QMimeType
4037)
4138from AnyQt .QtGui import (
42- QStandardItem , QStandardItemModel , QPalette , QColor , QIcon , QTextOption
39+ QStandardItem , QStandardItemModel , QPalette , QColor , QIcon ,
4340)
4441from AnyQt .QtWidgets import (
45- QLabel , QComboBox , QPushButton , QDialog , QDialogButtonBox , QGridLayout ,
42+ QLabel , QComboBox , QPushButton , QDialog , QDialogButtonBox ,
4643 QVBoxLayout , QSizePolicy , QFileIconProvider , QFileDialog ,
4744 QApplication , QMessageBox , QTextBrowser ,
4845 QStyle , QMenu , QHBoxLayout , QTableView , QHeaderView
5552
5653from pandas .api import types as pdtypes
5754
55+ from orangewidget .settings import Setting , SettingProvider , widget_settings_dir
56+
5857import Orange .data
5958from Orange .data import Table , ContinuousVariable , StringVariable
6059from Orange .misc .collections import natural_sorted
6160
62- from Orange .widgets import widget , gui , settings
61+ from Orange .widgets import widget , gui
6362from Orange .widgets .data .owtable import DataTableView , RichTableModel , is_sortable , TableSliceProxy
63+ from Orange .widgets .settings import PerfectDomainContextHandler
64+ from Orange .widgets .utils .settings import (
65+ QSettings_readArray , QSettings_writeArray
66+ )
6467from Orange .widgets .utils .concurrent import PyOwned
6568from Orange .widgets .utils import (
6669 textimport , concurrent as qconcurrent , unique_everseen , enum_get , qname
7174 PathItem , VarPath , AbsPath , samepath , prettyfypath , isprefixed ,
7275)
7376from Orange .widgets .utils .overlay import OverlayWidget
74- from Orange .widgets .utils .settings import (
75- QSettings_readArray , QSettings_writeArray
76- )
77- from orangewidget .settings import Setting , ContextSetting , SettingProvider
77+ from Orange .widgets .utils .itemdelegates import TableDataDelegate
7878
7979if typing .TYPE_CHECKING :
8080 # pylint: disable=invalid-name
@@ -658,13 +658,13 @@ class Warning(widget.OWWidget.Warning):
658658 'the Import Options to avoid this.' )
659659
660660 #: Paths and options of files accessed in a 'session'
661- _session_items = settings . Setting (
661+ _session_items = Setting (
662662 [], schema_only = True ) # type: List[Tuple[str, dict]]
663663
664- _session_items_v2 = settings . Setting (
664+ _session_items_v2 = Setting (
665665 [], schema_only = True ) # type: List[Tuple[Dict[str, str], dict]]
666666 #: Saved dialog state (last directory and selected filter)
667- dialog_state = settings . Setting ({
667+ dialog_state = Setting ({
668668 "directory" : "" ,
669669 "filter" : ""
670670 }) # type: Dict[str, str]
@@ -678,7 +678,7 @@ class Warning(widget.OWWidget.Warning):
678678 # with older saved workflows, where types not guessed differently, when
679679 # compatibility_mode=True widget have older guessing behaviour
680680 settings_version = 3
681- compatibility_mode = settings . Setting (False , schema_only = True )
681+ compatibility_mode = Setting (False , schema_only = True )
682682
683683 MaxHistorySize = 50
684684
@@ -968,7 +968,7 @@ def _path_must_be_relative_mb(self, prefix: str) -> QMessageBox:
968968 return mb
969969
970970 @Slot ()
971- def browse (self , prefixname = None , directory = None ):
971+ def browse (self ):
972972 """
973973 Open a file dialog and select a user specified file.
974974 """
@@ -1089,7 +1089,7 @@ def _local_settings(cls):
10891089 # type: () -> QSettings
10901090 """Return a QSettings instance with local persistent settings."""
10911091 filename = "{}.ini" .format (qname (cls ))
1092- fname = os .path .join (settings . widget_settings_dir (), filename )
1092+ fname = os .path .join (widget_settings_dir (), filename )
10931093 return QSettings (fname , QSettings .IniFormat )
10941094
10951095 def _add_recent (self , filename , options = None ):
0 commit comments