isort result
Change-Id: I137d9a6b4e2322f8df0506f9e8f751a4743aafd0 Reviewed-on: https://forge.frm2.tum.de/review/20218 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
de188983ba
commit
a255cfaa55
@ -26,19 +26,21 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import code
|
import code
|
||||||
from os import path
|
|
||||||
import socket
|
import socket
|
||||||
import threading
|
import threading
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
from os import path
|
||||||
|
|
||||||
|
import mlzlog
|
||||||
|
|
||||||
|
from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg
|
||||||
|
from secop.protocol.messages import DESCRIPTIONREQUEST, EVENTREPLY
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import configparser
|
import configparser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import ConfigParser as configparser
|
import ConfigParser as configparser
|
||||||
|
|
||||||
import mlzlog
|
|
||||||
from secop.protocol.interface import decode_msg, get_msg, encode_msg_frame
|
|
||||||
from secop.protocol.messages import EVENTREPLY, DESCRIPTIONREQUEST
|
|
||||||
|
|
||||||
|
|
||||||
class NameSpace(dict):
|
class NameSpace(dict):
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
from __future__ import division, print_function
|
from __future__ import division, print_function
|
||||||
|
|
||||||
from secop.datatypes import (ArrayOf, BoolType, EnumType, FloatRange,
|
from secop.datatypes import ArrayOf, BoolType, EnumType, \
|
||||||
StringType, StructOf, TupleOf)
|
FloatRange, StringType, StructOf, TupleOf
|
||||||
from secop.metaclass import ModuleMeta, add_metaclass
|
from secop.metaclass import ModuleMeta, add_metaclass
|
||||||
from secop.modules import Command, Parameter
|
from secop.modules import Command, Parameter
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ from secop.client.baseclient import Client as SECNode
|
|||||||
from secop.gui.modulectrl import ModuleCtrl
|
from secop.gui.modulectrl import ModuleCtrl
|
||||||
from secop.gui.nodectrl import NodeCtrl
|
from secop.gui.nodectrl import NodeCtrl
|
||||||
from secop.gui.paramview import ParameterView
|
from secop.gui.paramview import ParameterView
|
||||||
from secop.gui.qt import (QInputDialog, QMainWindow, QMessageBox, QObject,
|
from secop.gui.qt import QInputDialog, QMainWindow, QMessageBox, \
|
||||||
QTreeWidgetItem, pyqtSignal, pyqtSlot)
|
QObject, QTreeWidgetItem, pyqtSignal, pyqtSlot
|
||||||
from secop.gui.util import loadUi
|
from secop.gui.util import loadUi
|
||||||
|
|
||||||
ITEM_TYPE_NODE = QTreeWidgetItem.UserType + 1
|
ITEM_TYPE_NODE = QTreeWidgetItem.UserType + 1
|
||||||
|
@ -26,8 +26,8 @@ from __future__ import division, print_function
|
|||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from secop.gui.qt import (QBrush, QColor, QPainter, QPen, QPointF, QPolygonF,
|
from secop.gui.qt import QBrush, QColor, QPainter, QPen, \
|
||||||
QRectF, QSize, Qt, QWidget)
|
QPointF, QPolygonF, QRectF, QSize, Qt, QWidget
|
||||||
|
|
||||||
_magenta = QBrush(QColor('#A12F86'))
|
_magenta = QBrush(QColor('#A12F86'))
|
||||||
_yellow = QBrush(QColor('yellow'))
|
_yellow = QBrush(QColor('yellow'))
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
from __future__ import division, print_function
|
from __future__ import division, print_function
|
||||||
|
|
||||||
from secop.gui.params import ParameterView
|
from secop.gui.params import ParameterView
|
||||||
from secop.gui.qt import QCheckBox, QDialog, QLabel, QMessageBox, QPushButton, \
|
from secop.gui.qt import QCheckBox, QDialog, QLabel, \
|
||||||
QSizePolicy, QWidget
|
QMessageBox, QPushButton, QSizePolicy, QWidget
|
||||||
from secop.gui.util import loadUi
|
from secop.gui.util import loadUi
|
||||||
from secop.gui.valuewidgets import get_widget
|
from secop.gui.valuewidgets import get_widget
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ from time import sleep
|
|||||||
|
|
||||||
from secop.datatypes import EnumType, StringType
|
from secop.datatypes import EnumType, StringType
|
||||||
from secop.errors import SECoPError
|
from secop.errors import SECoPError
|
||||||
from secop.gui.qt import (QFont, QFontMetrics, QLabel, QMessageBox,
|
from secop.gui.qt import QFont, QFontMetrics, QLabel, \
|
||||||
QTextCursor, QWidget, pyqtSlot, toHtmlEscaped)
|
QMessageBox, QTextCursor, QWidget, pyqtSlot, toHtmlEscaped
|
||||||
from secop.gui.util import loadUi
|
from secop.gui.util import loadUi
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -23,18 +23,20 @@
|
|||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
from secop.datatypes import EnumType, FloatRange, IntRange
|
||||||
|
from secop.gui.qt import QPushButton as QButton
|
||||||
|
from secop.gui.qt import QCheckBox, QLabel, QLineEdit, \
|
||||||
|
QMessageBox, QSizePolicy, Qt, QWidget, pyqtSignal, pyqtSlot
|
||||||
|
from secop.gui.util import loadUi
|
||||||
|
from secop.lib import formatExtendedStack
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# py2
|
# py2
|
||||||
unicode(u'')
|
unicode(u'')
|
||||||
except NameError:
|
except NameError:
|
||||||
unicode = str # pylint: disable=redefined-builtin
|
unicode = str # pylint: disable=redefined-builtin
|
||||||
|
|
||||||
from secop.gui.qt import QWidget, QLabel, QPushButton as QButton, QLineEdit, \
|
|
||||||
QMessageBox, QCheckBox, QSizePolicy, Qt, pyqtSignal, pyqtSlot
|
|
||||||
|
|
||||||
from secop.gui.util import loadUi
|
|
||||||
from secop.datatypes import EnumType, FloatRange, IntRange
|
|
||||||
from secop.lib import formatExtendedStack
|
|
||||||
|
|
||||||
|
|
||||||
class ParameterWidget(QWidget):
|
class ParameterWidget(QWidget):
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
|
|
||||||
from __future__ import division, print_function
|
from __future__ import division, print_function
|
||||||
|
|
||||||
|
from secop.gui.qt import QLabel, QSizePolicy, QWidget
|
||||||
|
from secop.gui.util import loadUi
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# py2
|
# py2
|
||||||
unicode(u'')
|
unicode(u'')
|
||||||
@ -30,8 +33,6 @@ except NameError:
|
|||||||
# py3
|
# py3
|
||||||
unicode = str # pylint: disable=redefined-builtin
|
unicode = str # pylint: disable=redefined-builtin
|
||||||
|
|
||||||
from secop.gui.qt import QLabel, QSizePolicy, QWidget
|
|
||||||
from secop.gui.util import loadUi
|
|
||||||
|
|
||||||
|
|
||||||
class ParameterView(QWidget):
|
class ParameterView(QWidget):
|
||||||
|
@ -23,11 +23,10 @@
|
|||||||
|
|
||||||
from __future__ import division, print_function
|
from __future__ import division, print_function
|
||||||
|
|
||||||
from secop.datatypes import (ArrayOf, BLOBType, BoolType, EnumType, FloatRange,
|
from secop.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \
|
||||||
IntRange, StringType, StructOf, TupleOf)
|
FloatRange, IntRange, StringType, StructOf, TupleOf
|
||||||
from secop.gui.qt import (QCheckBox, QComboBox, QDialog, QDoubleSpinBox,
|
from secop.gui.qt import QCheckBox, QComboBox, QDialog, QDoubleSpinBox, \
|
||||||
QFrame, QGridLayout, QGroupBox, QLabel, QLineEdit,
|
QFrame, QGridLayout, QGroupBox, QLabel, QLineEdit, QSpinBox, QVBoxLayout
|
||||||
QSpinBox, QVBoxLayout)
|
|
||||||
from secop.gui.util import loadUi
|
from secop.gui.util import loadUi
|
||||||
|
|
||||||
# XXX: implement live validators !!!!
|
# XXX: implement live validators !!!!
|
||||||
|
@ -21,21 +21,20 @@
|
|||||||
# *****************************************************************************
|
# *****************************************************************************
|
||||||
"""Define helpers"""
|
"""Define helpers"""
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import errno
|
import errno
|
||||||
import signal
|
|
||||||
import socket
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import linecache
|
import linecache
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import signal
|
||||||
|
import socket
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
import subprocess
|
|
||||||
import unicodedata
|
import unicodedata
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
|
|
||||||
repodir = path.abspath(path.join(path.dirname(__file__), u'..', u'..'))
|
repodir = path.abspath(path.join(path.dirname(__file__), u'..', u'..'))
|
||||||
|
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
|
@ -26,11 +26,11 @@ from __future__ import division, print_function
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from secop.datatypes import (EnumType, FloatRange, StringType, TupleOf,
|
from secop.datatypes import EnumType, FloatRange, StringType, TupleOf, \
|
||||||
get_datatype)
|
get_datatype
|
||||||
from secop.errors import ConfigError, ProgrammingError
|
from secop.errors import ConfigError, ProgrammingError
|
||||||
from secop.lib import (formatException, formatExtendedStack, mkthread,
|
from secop.lib import formatException, formatExtendedStack, mkthread, \
|
||||||
unset_value)
|
unset_value
|
||||||
from secop.lib.enum import Enum
|
from secop.lib.enum import Enum
|
||||||
from secop.metaclass import ModuleMeta, add_metaclass
|
from secop.metaclass import ModuleMeta, add_metaclass
|
||||||
from secop.params import Command, Override, Parameter, PREDEFINED_ACCESSIBLES
|
from secop.params import Command, Override, Parameter, PREDEFINED_ACCESSIBLES
|
||||||
|
@ -42,13 +42,12 @@ import threading
|
|||||||
from time import time as currenttime
|
from time import time as currenttime
|
||||||
|
|
||||||
from secop.errors import SECoPServerError as InternalError
|
from secop.errors import SECoPServerError as InternalError
|
||||||
from secop.errors import (BadValueError, NoSuchCommandError, NoSuchModuleError,
|
from secop.errors import BadValueError, NoSuchCommandError, \
|
||||||
NoSuchParameterError, ProtocolError, ReadOnlyError)
|
NoSuchModuleError, NoSuchParameterError, ProtocolError, ReadOnlyError
|
||||||
from secop.params import Parameter
|
from secop.params import Parameter
|
||||||
from secop.protocol.messages import (COMMANDREPLY, DESCRIPTIONREPLY,
|
from secop.protocol.messages import COMMANDREPLY, DESCRIPTIONREPLY, \
|
||||||
DISABLEEVENTSREPLY, ENABLEEVENTSREPLY,
|
DISABLEEVENTSREPLY, ENABLEEVENTSREPLY, EVENTREPLY, \
|
||||||
EVENTREPLY, HEARTBEATREPLY, IDENTREPLY,
|
HEARTBEATREPLY, IDENTREPLY, IDENTREQUEST, WRITEREPLY
|
||||||
IDENTREQUEST, WRITEREPLY)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
unicode('a')
|
unicode('a')
|
||||||
|
@ -26,8 +26,8 @@ import socket
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from secop.errors import SECoPError
|
from secop.errors import SECoPError
|
||||||
from secop.lib import (formatException, formatExtendedStack,
|
from secop.lib import formatException, \
|
||||||
formatExtendedTraceback)
|
formatExtendedStack, formatExtendedTraceback
|
||||||
from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg
|
from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg
|
||||||
from secop.protocol.messages import HELPREPLY, HELPREQUEST, HelpMessage
|
from secop.protocol.messages import HELPREPLY, HELPREQUEST, HelpMessage
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ import random
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from secop.datatypes import (ArrayOf, BoolType, EnumType, FloatRange, IntRange,
|
from secop.datatypes import ArrayOf, BoolType, EnumType, \
|
||||||
StringType, StructOf, TupleOf)
|
FloatRange, IntRange, StringType, StructOf, TupleOf
|
||||||
from secop.lib.enum import Enum
|
from secop.lib.enum import Enum
|
||||||
from secop.modules import Drivable, Override, Parameter, Readable
|
from secop.modules import Drivable, Override, Parameter, Readable
|
||||||
|
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
|
|
||||||
from __future__ import division, print_function
|
from __future__ import division, print_function
|
||||||
|
|
||||||
|
import random
|
||||||
|
|
||||||
|
from secop.datatypes import FloatRange, StringType
|
||||||
|
from secop.modules import Communicator, Drivable, Parameter, Readable
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# py2
|
# py2
|
||||||
unicode
|
unicode
|
||||||
@ -29,10 +34,7 @@ except NameError:
|
|||||||
# py3
|
# py3
|
||||||
unicode = str # pylint: disable=redefined-builtin
|
unicode = str # pylint: disable=redefined-builtin
|
||||||
|
|
||||||
import random
|
|
||||||
|
|
||||||
from secop.datatypes import FloatRange, StringType
|
|
||||||
from secop.modules import Communicator, Drivable, Parameter, Readable
|
|
||||||
|
|
||||||
|
|
||||||
class LN2(Readable):
|
class LN2(Readable):
|
||||||
|
@ -34,16 +34,19 @@ import threading
|
|||||||
from time import time as currenttime
|
from time import time as currenttime
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
import PyTango
|
try:
|
||||||
|
import PyTango
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
#from secop.parse import Parser
|
#from secop.parse import Parser
|
||||||
from secop.datatypes import (ArrayOf, EnumType, FloatRange, IntRange,
|
from secop.datatypes import ArrayOf, EnumType, \
|
||||||
StringType, TupleOf)
|
FloatRange, IntRange, StringType, TupleOf
|
||||||
from secop.errors import (CommunicationFailedError, ConfigError, HardwareError,
|
from secop.errors import CommunicationFailedError, \
|
||||||
ProgrammingError)
|
ConfigError, HardwareError, ProgrammingError
|
||||||
from secop.lib import lazy_property
|
from secop.lib import lazy_property
|
||||||
from secop.modules import (Command, Drivable, Module, Override, Parameter,
|
from secop.modules import Command, Drivable, \
|
||||||
Readable)
|
Module, Override, Parameter, Readable
|
||||||
|
|
||||||
#####
|
#####
|
||||||
|
|
||||||
|
@ -28,10 +28,6 @@ import pytest
|
|||||||
|
|
||||||
from secop.client.baseclient import Client
|
from secop.client.baseclient import Client
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# define Test-only connection object
|
# define Test-only connection object
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ from __future__ import division, print_function
|
|||||||
# no fixtures needed
|
# no fixtures needed
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from secop.datatypes import (ArrayOf, BLOBType, BoolType, DataType, EnumType,
|
from secop.datatypes import ArrayOf, BLOBType, BoolType, \
|
||||||
FloatRange, IntRange, ProgrammingError,
|
DataType, EnumType, FloatRange, IntRange, ProgrammingError, \
|
||||||
StringType, StructOf, TupleOf, get_datatype)
|
StringType, StructOf, TupleOf, get_datatype
|
||||||
|
|
||||||
|
|
||||||
def test_DataType():
|
def test_DataType():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user