Skip to content

Commit 85893e5

Browse files
committed
Fixes for flake8
1 parent c42cb99 commit 85893e5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

utils/myspell.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#! /usr/bin/env python
22

3+
import sys
34
from enchant.checker import SpellChecker
45
from enchant.tokenize import EmailFilter, URLFilter
56
from enchant import DictWithPWL
@@ -17,9 +18,13 @@ def myspell(fname):
1718
for x in fp:
1819
spell_checker.set_text(x)
1920
for error in spell_checker:
20-
print("Error:", error.word, "(line", lc, ")")
21+
print("Error:", error.word, "(line", lc, ")", file=sys.stderr)
2122
lc = lc+1
2223

2324

2425
if __name__ == '__main__':
25-
myspell('/Users/dchen/SimpleITK/Code/Common/include/sitkImage.h')
26+
if len(sys.argv) > 1:
27+
for x in sys.argv[1:]:
28+
myspell(x)
29+
else:
30+
print("Usage: myspell.py file1 ... fileN")

0 commit comments

Comments
 (0)