Skip to content

Commit 8088d61

Browse files
committed
qt updates
1 parent 367969c commit 8088d61

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

pychron/core/ui/qt/tabular_editor.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from pickle import dumps
2020

2121
import six
22-
from PyQt5.QtCore import QSize
2322
from pyface.qt import QtCore, QtGui
2423
from pyface.qt.QtGui import QHeaderView, QApplication
2524
from traits.api import (
@@ -377,7 +376,7 @@ def sizeHint(self):
377376
try:
378377
return super(_TableView, self).sizeHint()
379378
except TypeError:
380-
return QSize()
379+
return QtCore.QSize()
381380

382381
# private
383382
def _copy(self):

pychron/core/ui/qt/video_editor.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# ===============================================================================
16-
from PyQt5 import QtWidgets
17-
from PyQt5.QtCore import QTimer, QSize, Qt, QPoint
18-
from PyQt5.QtGui import QImage, QPixmap, QPainter, QPen
19-
from pyface.qt import QtCore
16+
from pyface.qt import QtWidgets, QtCore
17+
from pyface.qt.QtCore import QTimer, QSize, Qt, QPoint
18+
from pyface.qt.QtGui import QImage, QPixmap, QPainter, QPen, QLabel
2019
from traitsui.basic_editor_factory import BasicEditorFactory
2120

2221
try:
2322
import vlc
2423
except ImportError:
2524
pass
26-
from PyQt5.QtWidgets import QLabel
2725
from traitsui.qt4.editor import Editor
2826

2927
from traits.api import Any

pychron/envisage/tasks/actions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def get_key_binding(k_id):
4545

4646
try:
4747
return user_key_map[k_id][0]
48-
except KeyError:
49-
pass
48+
except (KeyError, IndexError, TypeError) as e:
49+
print(f'Key binding "{k_id}" not found. {e}')
5050

5151

5252
class myTaskAction(TaskAction):

pychron/experiment/utilities/human_error_checker.py

+6
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ def _check_run(self, run, inform, test):
250250
# self._mass_spec_required = True
251251
self._set_extraction_line_required(run)
252252

253+
# check for syn extraction
254+
if run.extraction_script:
255+
if "syn" in run.extraction_script:
256+
if not run.syn_extraction_script:
257+
return "syn extraction script missing"
258+
253259
def _set_extraction_line_required(self, run):
254260
if any(
255261
(

pychron/image/toupcam/camera_v2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from copy import copy
2222
from io import StringIO
2323
from PIL import Image
24-
from PyQt5.QtGui import QImage
24+
from pyface.qt.QtGui import QImage
2525
from numpy import zeros, uint8, uint32
2626

2727
# ============= enthought library imports =======================

pychron/updater/library_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import subprocess
1818
import sys
1919

20-
from PyQt5.QtWidgets import QApplication
20+
from pyface.qt.QtGui import QApplication
2121
from traits.api import HasTraits, Str, List, Int, Button
2222
from traitsui.api import View, UItem, Item, TabularEditor, HGroup
2323
from traitsui.tabular_adapter import TabularAdapter

0 commit comments

Comments
 (0)