Commit 00f59230 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/pylint' into 'master'

[python][linter] Fix pylint warning appearing with newer version

See merge request !3147
parents 04a29b64 697569f1
Pipeline #17579 failed with stages
in 0 seconds
......@@ -65,9 +65,7 @@ if __name__ == "__main__":
print("*" * 54)
if os.path.exists("docker"):
print(
"\nA docker folder already exists. " "Continue anyway? - will be overwritten - [y/N]\n"
)
print("\nA docker folder already exists. Continue anyway? - will be overwritten - [y/N]\n")
delete = input()
if delete in ("y", "Y"):
shutil.rmtree("docker")
......
......@@ -127,7 +127,8 @@ def detectNewModule():
"""
print("\nDetecting the newly created module")
newModule = max([d for d in os.listdir() if os.path.isdir(d)], key=os.path.getmtime)
directories = [d for d in os.listdir() if os.path.isdir(d)]
newModule = max(directories, key=os.path.getmtime)
isCorrectModule = queryYesNo(
f"Found '{newModule}' to be the new module. Is this correct?", default=None
......@@ -281,7 +282,7 @@ def guideFolderDeletion(modulePath, candidates):
deleted = []
if queryYesNo(
"Do you want to remove some of them " "(by choosing 'no' they are all preserved)?",
"Do you want to remove some of them (by choosing 'no' they are all preserved)?",
default="no",
):
for folder in foldersWithoutSources:
......
......@@ -175,9 +175,9 @@ def convertPVTUToVTU(pvturoot, filename):
# add all the data arrays
for i, dataArray in enumerate(cellDataArrays):
rootCellDataArrays[i].text += " " + cellDataArrays[i].text
rootCellDataArrays[i].text += " " + dataArray.text
for i, dataArray in enumerate(pointDataArrays):
rootPointDataArrays[i].text += " " + pointDataArrays[i].text
rootPointDataArrays[i].text += " " + dataArray.text
# update the number of cells and points
newNumPoints = int(piece.findall(".//Piece")[0].attrib["NumberOfPoints"]) + rootNumPoints
......@@ -531,7 +531,7 @@ def sortVTKByCoordinates(root1, root2, verbose, convertedFromParallelVtu=False):
# first compare by coordinates, if the same compare largestCellMidPointForVertex
def vertexCompare(valueA, valueB, largestCellMidPoint, bBoxMax, bBoxMin):
epsilon = math.sqrt(sum([(a - b) ** 2 for a, b in zip(bBoxMax, bBoxMin)])) * 1e-7
epsilon = math.sqrt(sum((a - b) ** 2 for (a, b) in zip(bBoxMax, bBoxMin))) * 1e-7
res = floatVecCompare(valueA[1], valueB[1], epsilon)
if res != 0:
return res
......
......@@ -109,7 +109,7 @@ if __name__ == "__main__":
if args["config"] and args["all"]:
sys.exit(
"Error: both `config` and `all` specified. " "Please set only one of these arguments."
"Error: both `config` and `all` specified. Please set only one of these arguments."
)
# prepare build and test flags
......
......@@ -298,7 +298,7 @@ def mostRecentCommonCommitWithRemote(modFolderPath, branchFilter=isPersistentBra
return branches[0], rev
raise RuntimeError(
"Could not find suitable ancestor commit" " on a branch that matches the given filter"
"Could not find suitable ancestor commit on a branch that matches the given filter"
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment