-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Add ruff linter and formatter for Python #2043
feat: Add ruff linter and formatter for Python #2043
Conversation
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.
Boom
} | ||
|
||
async handleSaveFromShortcut(): Promise<void> { | ||
await this.handleFormat(); |
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.
I don't think we should auto format on save by default unless the user has opted in, configured the formatting settings, or has otherwise been notified this will be occurring. Imposing our preferred formatting settings on others without their approval is likely to annoy people.
I know this is going into a feature branch, but I think important to call that out.
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.
I commented this out for now and added a TODO comment to check if the user enabled format on save.
You can still format from the overflow menu on this branch
2bf15a9
into
deephaven:feature/python-formatter
This adds the linter/formatter, but does not add user configuration yet. So I created a feature branch for it.
This is lazy loaded and only loaded if there is a Python monaco instance. You can verify by looking for wasm files in the network tab.
One thing to note is since embed-widget has its own copy of everything, I believe there would be 2 copies of the wasm in DHC which is not great.