diff --git a/schema/plugin.json b/schema/plugin.json index b738109..35bfb20 100644 --- a/schema/plugin.json +++ b/schema/plugin.json @@ -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", diff --git a/src/index.tsx b/src/index.tsx index e3c46d3..4d32c92 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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 }); }