Skip to content

Commit

Permalink
PEP8 and pylint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Peisach committed May 19, 2024
1 parent d8402b4 commit 5e67504
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions wwpdb/utils/wf/dbapi/WfDbApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,8 @@ def exist(self, dataObj):
classId = None
instId = None
taskId = None
rd = {}

if len(dataObj) == 0:
existObj = False
else:
Expand Down
18 changes: 9 additions & 9 deletions wwpdb/utils/wf/plugins/PdbxUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def __templateFetchAnnAuto(self, kwD):
if outObjD["dst2"].getContainerTypeName() == "value":
outObjD["dst2"].setValue(yes_no_value)
elif outObjD["dst2"].getContainerTypeName() == "list":
outObjD["dst2"].setValue([ yes_no_value ])
outObjD["dst2"].setValue([yes_no_value])
else:
return False
#
Expand All @@ -254,7 +254,7 @@ def __templateFetchAnnAuto(self, kwD):
if outObjD["dst3"].getContainerTypeName() == "value":
outObjD["dst3"].setValue(siteName)
elif outObjD["dst3"].getContainerTypeName() == "list":
outObjD["dst3"].setValue([ siteName ])
outObjD["dst3"].setValue([siteName])
else:
return False
#
Expand Down Expand Up @@ -469,13 +469,13 @@ def __getAnnModAutoCompleteFlag(self):
if ret == "NO":
return ret
#
assemblyCategories = { "pdbx_struct_assembly": [ "id", "details" ], \
"pdbx_struct_assembly_gen": [ "assembly_id", "oper_expression", "asym_id_list" ], \
"pdbx_struct_oper_list": [ "id", "matrix[1][1]", "matrix[1][2]", "matrix[1][3]", \
"vector[1]", "matrix[2][1]", "matrix[2][2]", "matrix[2][3]", "vector[2]", "matrix[3][1]", \
"matrix[3][2]", "matrix[3][3]", "vector[3]" ] }
assemblyCategories = {"pdbx_struct_assembly": ["id", "details"],
"pdbx_struct_assembly_gen": ["assembly_id", "oper_expression", "asym_id_list"],
"pdbx_struct_oper_list": ["id", "matrix[1][1]", "matrix[1][2]", "matrix[1][3]",
"vector[1]", "matrix[2][1]", "matrix[2][2]", "matrix[2][3]", "vector[2]", "matrix[3][1]",
"matrix[3][2]", "matrix[3][3]", "vector[3]"]}
#
for cate,items in assemblyCategories.items():
for cate, items in assemblyCategories.items():
if self.__block.IsTablePresent(cate):
table = self.__block.GetTable(cate)
if table and (table.GetNumRows() > 0):
Expand All @@ -502,7 +502,7 @@ def __getAnnModAutoCompleteFlag(self):
#
#
return ret
except Exception as _e:
except Exception as _e: # noqa: F841
traceback.print_exc(file=sys.stderr)
return "NO"
#

0 comments on commit 5e67504

Please sign in to comment.