Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake8Lint can't parse trailing '}' #99

Open
TheJKFever opened this issue Jan 23, 2017 · 0 comments
Open

Flake8Lint can't parse trailing '}' #99

TheJKFever opened this issue Jan 23, 2017 · 0 comments

Comments

@TheJKFever
Copy link

I have default settings. Flake8Lint unexpectedly stopped showing errors. I thought my code was fine, but when I saved it with an obvious error and Flake8Lint didn't show any problems I looked in the console and saw this. The particular indentation error it's referring to is definitely not an issue.

Flake8Lint ERROR: Traceback (most recent call last):
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python
Flake8 Lint/lint.py", line 405, in <module>
Flake8Lint ERROR: for lint_warning in lint(stdin_lines, lint_settings):
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/lint.py", line 206, in lint
Flake8Lint ERROR: for error in PEP257Checker().check_source(lines, ''):
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 1359, in check_source
Flake8Lint ERROR: module = parse(StringIO(source), filename)
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 275, in __call__
Flake8Lint ERROR: return self.parse_module()
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 428, in parse_module
Flake8Lint ERROR: children = list(self.parse_definitions(Module, all=True))
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 366, in parse_definitions
Flake8Lint ERROR: yield self.parse_definition(class_._nest(self.current.value))
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 471, in parse_definition
Flake8Lint ERROR: children = list(self.parse_definitions(class_))
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 366, in parse_definitions
Flake8Lint ERROR: yield self.parse_definition(class_._nest(self.current.value))
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 465, in parse_definition
Flake8Lint ERROR: self.leapfrog(tk.INDENT)
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 296, in leapfrog
Flake8Lint ERROR: self.stream.move()
Flake8Lint ERROR: File "/Users/me/Library/Application Support/Sublime Text 3/Packages/Python Flake8 Lint/contrib/pydocstyle.py", line 240, in move
Flake8Lint ERROR: current = next(self._generator, None)
Flake8Lint ERROR: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tokenize.py", line 357, in generate_tokens
Flake8Lint ERROR: ("<tokenize>", lnum, pos, line))
Flake8Lint ERROR: File "<tokenize>", line 536
Flake8Lint ERROR: "feed_items": [],
Flake8Lint ERROR: ^
Flake8Lint ERROR: IndentationError: unindent does not match any outer indentation level

I did a little more digging, and found there was an error on the page in the function above with a trailing '}'. When I deleted it, things went back to normal. But if I added a line x = 3}. It passed everything as normal and had the same console error output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant