Skip to content

Commit c42cb99

Browse files
committed
Fixes for flake8
1 parent 5574cd7 commit c42cb99

4 files changed

Lines changed: 13 additions & 16 deletions

File tree

codespell.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ def parse_args():
171171
dest='prefixes',
172172
help='Add word prefix (multiples allowed)')
173173

174-
175174
parser.add_argument('--miss', '-m', action='store_true', default=False,
176175
dest='miss', help='Only output the misspelt words')
177176

utils/itkcrawl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
wrds = dir(itk)
66

7-
result= []
7+
result = []
88

99
for w in wrds:
10-
x = getattr(itk,w)
10+
x = getattr(itk, w)
1111
for y in dir(x):
1212
if "_" in y:
1313
continue
@@ -17,5 +17,5 @@
1717
result2 = sorted(set(result))
1818

1919
for w in result2:
20-
if len(w)>2:
20+
if len(w) > 2:
2121
print(w)

utils/myspell.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
#! /usr/bin/env python
22

3-
import os
43
from enchant.checker import SpellChecker
5-
from enchant.tokenize import Filter, EmailFilter, URLFilter
4+
from enchant.tokenize import EmailFilter, URLFilter
65
from enchant import DictWithPWL
76

87

98
def myspell(fname):
109
my_dict = DictWithPWL('en_US', 'mywords.txt')
1110
print(my_dict)
1211

13-
spell_checker = SpellChecker(my_dict, filters = [EmailFilter, URLFilter])
12+
spell_checker = SpellChecker(my_dict, filters=[EmailFilter, URLFilter])
1413

1514
fp = open(fname, 'r')
1615

1716
lc = 1
1817
for x in fp:
19-
spell_checker.set_text(x)
20-
for error in spell_checker:
21-
print("Error:", error.word, "(line", lc, ")")
22-
lc = lc+1
18+
spell_checker.set_text(x)
19+
for error in spell_checker:
20+
print("Error:", error.word, "(line", lc, ")")
21+
lc = lc+1
2322

2423

25-
#myspell('/Users/dchen/SimpleITK/Documentation/docs/source/faq.rst')
26-
myspell('/Users/dchen/SimpleITK/Code/Common/include/sitkImage.h')
27-
24+
if __name__ == '__main__':
25+
myspell('/Users/dchen/SimpleITK/Code/Common/include/sitkImage.h')

utils/sitkcrawl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
wrds = dir(sitk)
66

7-
result= []
7+
result = []
88

99
for w in wrds:
10-
x = getattr(sitk,w)
10+
x = getattr(sitk, w)
1111
for y in dir(x):
1212
if "_" in y:
1313
continue

0 commit comments

Comments
 (0)