further fixes of py3 issues
complaints by pylint are mainly related to - remove object from base list in class definitions - unnecessary else/elif after return/raise Change-Id: I13d15449149cc8bba0562338d0c9c42e97163bdf Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21325 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -6,7 +6,7 @@ import pytest
|
||||
@pytest.fixture(scope="module")
|
||||
def constants():
|
||||
# setup
|
||||
class Constants(object):
|
||||
class Constants:
|
||||
ONE = 1
|
||||
TWO = 2
|
||||
c = Constants()
|
||||
|
@ -29,7 +29,7 @@ from secop.basic_validators import FloatProperty, PositiveFloatProperty, \
|
||||
NonNegativeIntProperty, BoolProperty, StringProperty, UnitProperty, \
|
||||
FmtStrProperty, OneOfProperty, NoneOr, EnumProperty, TupleProperty
|
||||
|
||||
class unprintable(object):
|
||||
class unprintable:
|
||||
def __str__(self):
|
||||
raise NotImplementedError
|
||||
|
||||
|
@ -30,7 +30,7 @@ from secop.client.baseclient import Client
|
||||
# define Test-only connection object
|
||||
|
||||
|
||||
class TestConnect(object):
|
||||
class TestConnect:
|
||||
callbacks = []
|
||||
|
||||
def writeline(self, line):
|
||||
|
@ -28,7 +28,7 @@ from secop.modules import Drivable
|
||||
from secop.poller import Poller, REGULAR, DYNAMIC, SLOW
|
||||
Status = Drivable.Status
|
||||
|
||||
class Time(object):
|
||||
class Time:
|
||||
STARTTIME = 1000 # artificial time zero
|
||||
def __init__(self):
|
||||
self.reset()
|
||||
@ -65,7 +65,7 @@ def patch_time(monkeypatch):
|
||||
monkeypatch.setattr(time, 'time', artime.time)
|
||||
|
||||
|
||||
class Event(object):
|
||||
class Event:
|
||||
def __init__(self):
|
||||
self.flag = False
|
||||
|
||||
@ -79,7 +79,7 @@ class Event(object):
|
||||
return self.flag
|
||||
|
||||
|
||||
class Parameter(object):
|
||||
class Parameter:
|
||||
def __init__(self, name, readonly, poll, polltype, interval):
|
||||
self.poll = poll
|
||||
self.polltype = polltype # used for check only
|
||||
@ -107,7 +107,7 @@ class Parameter(object):
|
||||
return 'Parameter(%s)' % ", ".join("%s=%r" % item for item in self.__dict__.items())
|
||||
|
||||
|
||||
class Module(object):
|
||||
class Module:
|
||||
properties = {}
|
||||
pollerClass = Poller
|
||||
iodev = 'common_iodev'
|
||||
|
Reference in New Issue
Block a user