-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change checker instantiation to provide stdin compatibility
Previously, when the checker instance is created it requested the filename from flake8 in order to load the source and parse to obtain a typed AST, as the flake8 provided AST is not guaranteed to contain type information. While sufficient for parsing files, this falls apart when attempting to parse code piped to stdin & causes our plugin to error out. To mitigate these issues, the source is requested from flake8 as lines (list of strings), which is joined & passed into the typed AST generation rather than farming to a file IO task. This also allows us to drop the request for the AST from flake8 that we don't use, as requesting the lines will ensure that the plugin is registered. The related test helpers have been updated to accommodate the change in instantiation. Closes #52
- Loading branch information
Showing
3 changed files
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters