Skip to content
Browse files

Typo in UTF-8 fix, used wrong version of the file. Changing scope fro…

…m Keyword to Invalid, to use a more appropiate color for errors
  • Loading branch information...
1 parent f1f8114 commit 0296d0f9469f47df753927e181d16b34487e48e6 @maraujop maraujop committed Feb 7, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 sublimeflakes.py
View
12 sublimeflakes.py
@@ -61,7 +61,7 @@ def check(codeString, filename):
# Okay, it's syntactically valid. Now parse it into an ast and check
# it.
ucodeString = unicode(codeString).encode('utf-8')
- tree = compiler.parse(codeString)
+ tree = compiler.parse(ucodeString)
w = checker.Checker(tree, filename)
w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
return w.messages
@@ -163,14 +163,14 @@ def addMessage(lineno, message):
underlineRange(error.lineno, error.offset)
if len(errors) == 1 and False:
outlines = [view.full_line(view.text_point(error.lineno, 0)) for lineno in lines]
- view.add_regions('pyflakes-syntax', outlines, 'keyword', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
- view.add_regions('pyflakes-syntax-underline', underline, 'keyword', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
+ view.add_regions('pyflakes-syntax', outlines, 'Invalid', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
+ view.add_regions('pyflakes-syntax-underline', underline, 'Invalid', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
return
elif isinstance(error, PythonError):
if len(errors) == 1 and False:
outlines = [view.full_line(view.text_point(error.lineno, 0)) for lineno in lines]
- view.add_regions('pyflakes-syntax', outlines, 'keyword', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
+ view.add_regions('pyflakes-syntax', outlines, 'Invalid', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
return
elif isinstance(error, messages.UnusedImport):
@@ -213,8 +213,8 @@ def addMessage(lineno, message):
if underline or lines:
outlines = [view.full_line(view.text_point(lineno, 0)) for lineno in lines]
- view.add_regions('pyflakes-underline', underline, 'keyword', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
- view.add_regions('pyflakes-outlines', outlines, 'keyword', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
+ view.add_regions('pyflakes-underline', underline, 'Invalid', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
+ view.add_regions('pyflakes-outlines', outlines, 'Invalid', drawType)#sublime.DRAW_EMPTY_AS_OVERWRITE | sublime.DRAW_OUTLINED)
lineMessages[vid] = errorMessages

0 comments on commit 0296d0f

Please sign in to comment.
Something went wrong with that request. Please try again.