Skip to content

Commit 1d62e5f

Browse files
committed
more pylint
1 parent eb93ec5 commit 1d62e5f

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
pip install pylint
2323
- name: Analysing the code with pylint
2424
run: |
25-
pylint $(git ls-files '*.py') --disable C0104,C0410,C0411,W0611,C0115,W0613,C0301,C0114,C0116,C0103,W1514,R1732,W1509,R0913,R0914,R1702,R0912,R0915,R0801,R0911,R0917
25+
pylint $(git ls-files '*.py') --disable C0104,C0201,C0206,C0410,C0411,W0611,C0115,W0613,C0301,C0114,C0116,C0103,W1514,R1732,W1509,R0913,R0914,R1702,R0912,R0915,R0801,R0911,R0917

universalmutator/fe_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,4 @@ def handler(tmpMutantName, mutant, sourceFile, uniqueMutants):
4242
return "REDUNDANT"
4343
uniqueMutants[code] = 1
4444
return "VALID"
45-
else:
46-
return "INVALID"
45+
return "INVALID"

universalmutator/java_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ def handler(tmpMutantName, mutant, sourceFile, uniqueMutants):
2323
os.remove(classBackupName)
2424
if r == 0:
2525
return "VALID"
26-
else:
27-
return "INVALID"
26+
return "INVALID"

universalmutator/prioritize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import glob
33
import sys
44

5-
import universalmutator.utils as utils
5+
from universalmutator import utils
66

77

88
def main():
@@ -106,7 +106,7 @@ def main():
106106
ranking = utils.FPF(sdmutants, N, cutoff=cutoff, verbose=verbose, mutantDir=mdir,
107107
sourceDir=sdir)
108108
with open(outfile, 'w') as outf:
109-
for (m, r) in ranking:
109+
for (m, _) in ranking:
110110
mname = m[0]
111111
outf.write(mname + "\n")
112112
else:

universalmutator/prune.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33
import sys
44

5-
import universalmutator.utils as utils
5+
from universalmutator import utils
66

77

88
def main():
@@ -74,8 +74,7 @@ def main():
7474

7575
with open(config, 'r') as cfile:
7676
for line in cfile:
77-
if line[-1] == "\n":
78-
r = line[:-1]
77+
r = line.rstrip('\n')
7978
(ctype, crule) = r.split(": ", 1)
8079
if ctype not in constraints:
8180
print("INVALID CONSTRAINT TYPE IN PRUNING RULE:", line)

0 commit comments

Comments
 (0)