-
Notifications
You must be signed in to change notification settings - Fork 756
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
fix skipping of physical checks when file does not end in newline #961
Conversation
except (SyntaxError, tokenize.TokenError): | ||
self.report_invalid_syntax() | ||
|
||
def maybe_check_physical(self, token): | ||
def maybe_check_physical(self, token, prev_physical): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to replicate some of this logic to Flake8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, I plan to work on that today!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's the flake8 patch with essentially the same logic!
Confirmed it works for the reported case (which is my actual use-case):
|
Resolves #960