mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8: Some modifications to respect pep8 standard code.
This commit is contained in:
1 parent
8544dd1144
commit
fa2454d079
152 files changed
+1626
-1277
No files matched your search
@@ -28,6 +28,7 @@ from Model.Friction.Friction import Friction
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class FrictionList(PamhyrModelList):
|
||||
_sub_classes = [
|
||||
Friction
|
||||
@@ -46,8 +47,8 @@ class FrictionList(PamhyrModelList):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def _sql_load(cls, execute, data = None):
|
||||
new = cls(status = data['status'])
|
||||
def _sql_load(cls, execute, data=None):
|
||||
new = cls(status=data['status'])
|
||||
|
||||
new._lst = Friction._sql_load(
|
||||
execute, data
|
||||
@@ -55,7 +56,7 @@ class FrictionList(PamhyrModelList):
|
||||
|
||||
return new
|
||||
|
||||
def _sql_save(self, execute, data = None):
|
||||
def _sql_save(self, execute, data=None):
|
||||
reach = data["reach"]
|
||||
execute(f"DELETE FROM friction WHERE reach = {reach.id}")
|
||||
|
||||
@@ -63,7 +64,7 @@ class FrictionList(PamhyrModelList):
|
||||
ind = 0
|
||||
for friction in self._lst:
|
||||
data["ind"] = ind
|
||||
ok &= friction._sql_save(execute, data = data)
|
||||
ok &= friction._sql_save(execute, data=data)
|
||||
ind += 1
|
||||
|
||||
return ok
|
||||
@@ -76,7 +77,7 @@ class FrictionList(PamhyrModelList):
|
||||
lambda p: p[1],
|
||||
sorted(
|
||||
self._lst,
|
||||
key = lambda p: p[0]
|
||||
key=lambda p: p[0]
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -93,7 +94,7 @@ class FrictionList(PamhyrModelList):
|
||||
return self.lst
|
||||
|
||||
def new(self, index):
|
||||
n = Friction(status = self._status)
|
||||
n = Friction(status=self._status)
|
||||
self._lst.insert(index, n)
|
||||
self._status.modified()
|
||||
return n
|
||||
Reference in new issue
Block a user