mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8 Model
This commit is contained in:
1 parent
da7ef60bef
commit
872235e94f
19 files changed
+118
-289
No files matched your search
@@ -30,11 +30,13 @@ from Model.Except import NotImplementedMethodeError
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class OutputRKAdists(SQLSubModel):
|
||||
_sub_classes = []
|
||||
_id_cnt = 0
|
||||
|
||||
def __init__(self, id: int = -1, reach = None, rk = None, title: str = "", status=None):
|
||||
def __init__(self, id: int = -1, reach=None,
|
||||
rk=None, title: str = "", status=None):
|
||||
super(OutputRKAdists, self).__init__()
|
||||
|
||||
self._status = status
|
||||
@@ -79,7 +81,6 @@ class OutputRKAdists(SQLSubModel):
|
||||
self._title = title
|
||||
self._status.modified()
|
||||
|
||||
|
||||
@classmethod
|
||||
def _db_create(cls, execute):
|
||||
|
||||
@@ -105,9 +106,9 @@ class OutputRKAdists(SQLSubModel):
|
||||
def _db_load(cls, execute, data=None):
|
||||
new = []
|
||||
|
||||
#reach = data["reach"]
|
||||
#profile = data["profile"]
|
||||
status = data["status"]
|
||||
# reach = data["reach"]
|
||||
# profile = data["profile"]
|
||||
status = data["status"]
|
||||
|
||||
table = execute(
|
||||
"SELECT id, reach, rk, title " +
|
||||
@@ -116,10 +117,10 @@ class OutputRKAdists(SQLSubModel):
|
||||
|
||||
if table is not None:
|
||||
for row in table:
|
||||
id = row[0]
|
||||
id = row[0]
|
||||
id_reach = row[1]
|
||||
id_rk = row[2]
|
||||
title = row[3]
|
||||
id_rk = row[2]
|
||||
title = row[3]
|
||||
|
||||
new_output = cls(
|
||||
id=id, reach=id_reach,
|
||||
@@ -156,9 +157,3 @@ class OutputRKAdists(SQLSubModel):
|
||||
def enabled(self, enabled):
|
||||
self._enabled = enabled
|
||||
self._status.modified()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user