Skip to content
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

Add option to use black with tidy-imports #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions schema/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"description": "Enable Pyflyby jupyterlab extension",
"default": true
},
"useBlack": {
"type": "boolean",
"title": "Use Black to format imports added",
"description": "Enable Black formatter on imports added to the top cell",
"default": false
},
"disableNotification": {
"type": "boolean",
"title": "Show notification when PYFLYBY starts adding imports to notebook",
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class PyflyByWidget extends Widget {
msg_id: lockId,
input_code: cellSource,
imports: imports,
use_black: this._settings.get('useBlack'),
type: PYFLYBY_COMMS.FORMAT_IMPORTS
});
}
Expand Down