-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
isort deletes lines with a typo #1688
Comments
What would you like I think this probably happens with all lines that start with one of these strings and then later turn out to be invalid import statements: Line 15 in f76ed04
I can think of many ways to handle this. For example fix the typo, treat the line as an import and sort it somehow anyway, or treat the line as a non-import and move it down. But I think the simplest and most useful thing here is to use the |
Thank you - For the other question, consider VS Code with default settings as a use case (https://code.visualstudio.com/docs/python/editing). Unless I am mistaken, it auto-sorts on each save, so a typo should not be uncommon for I think for the sake of consistency, you could do the same thing you do when you hit a line that is not detected as an import at all (
|
isort
5.7.0 invoked withoutputs
The second line is missing.
The text was updated successfully, but these errors were encountered: