From eb40d8119ab16c7beb158dcce067824d0b8c032f Mon Sep 17 00:00:00 2001 From: Anthex Date: Mon, 22 Apr 2019 16:38:22 +0200 Subject: [PATCH] suppress unused variable warning, remove useless toString function --- main.py | 2 +- structure.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 604fb04..ae4052f 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ testSample = testSamples[0] #cells Table initialization for i in range (0, 3): Tf.append([]) - for k in range (0,3): + for _ in range (0,3): Tf[i].append([]) #known fingerprints diff --git a/structure.py b/structure.py index e80fd8e..6bc0528 100644 --- a/structure.py +++ b/structure.py @@ -79,10 +79,10 @@ class MarkovModel(): self.previousCell = 0 for i in range (0, 11): self.MarkovValues.append([]) - for k in range (0, 10): + for _ in range (0, 10): self.MarkovValues[i].append(MarkovValue()) self.MarkovValues[10][0].nb = 1 #initial position sigma increment - + def moveToCellID(self, nextCell): self.MarkovValues[nextCell][self.previousCell].nb += 1 self.MarkovValues[10][nextCell].nb += 1 @@ -114,7 +114,7 @@ class MarkovModel(): def printPercentages(self): print("\t? \t1 \t2 \t3\t4 \t5 \t6 \t7 \t8 \t9") print("---------------------------------------------------------------------------------", end='') - + for i in range (1, 10): print("\r\n", end='') @@ -138,8 +138,7 @@ class MarkovModel(): def path(self, locationIDs): for loc in locationIDs: self.moveToCellID(loc) - def toString(self): - return "" + def newCell(n1, n2, n3, n4, l1, l2): return Cell(RSSVector(n1,n2,n3,n4), Location(l1,l2)) -- libgit2 0.21.4