Skip to content

Commit eee437f

Browse files
committed
Move ENCHANT_FOUND to have imports on top
1 parent cc16627 commit eee437f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

msgcheck/po.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@
3232

3333
# enchant module is optional, spelling is checked on demand
3434
# (argument -s/--spell)
35-
ENCHANT_FOUND = False
3635
try:
3736
from enchant import Dict, DictWithPWL, DictNotFoundError
3837
from enchant.checker import SpellChecker
3938
ENCHANT_FOUND = True
4039
except ImportError:
41-
pass
40+
ENCHANT_FOUND = False
4241

4342
from . utils import count_lines, replace_formatters
4443

@@ -520,7 +519,6 @@ def check_files(self, files):
520519
po_file.filename)]))
521520
continue
522521
# compile the file (except if disabled)
523-
compile_output = ''
524522
compile_rc = 0
525523
if self.checks['compile']:
526524
compile_output, compile_rc = po_file.compile()

0 commit comments

Comments
 (0)