Skip to content

Conversation

@jicruz96
Copy link
Contributor

@jicruz96 jicruz96 commented Jul 5, 2024

closes #415

Let's assume you have a file with a # isort: skip_file comment.

Before:

You'd get a nearly illegible traceback:

Screenshot 2024-07-05 at 12 07 56 AM

After:

Screenshot 2024-07-05 at 12 37 49 AM

except isort.exceptions.FileSkipped:
log_warning(traceback.format_exc(chain=True))
# Ignore file skipped.
return None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returning None avoids an uncaught LSP server error:

Screenshot 2024-07-05 at 12 10 24 AM

@karthiknadig karthiknadig self-assigned this Jul 9, 2024
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Jul 9, 2024
@karthiknadig karthiknadig added this to the July 2024 milestone Jul 9, 2024
@karthiknadig karthiknadig modified the milestones: July 2024, August 2024 Jul 24, 2024
@karthiknadig karthiknadig merged commit 3fe5d61 into microsoft:main Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undesired behavior on files with # isort: skip_file

3 participants