mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-87710 Simplify Black formatter package installation
(cherry picked from commit 43ee408dc90203f15b2c5d4bcef79652f73a1d37) GitOrigin-RevId: 42922f32cf5485da5a48e1ed2de4d3f986cc711e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
51d844aa00
commit
e71389d8b8
@@ -145,15 +145,10 @@ class BlackFormatterConfigurable(val project: Project) : BoundConfigurable(PyBun
|
||||
.applyToComponent { icon = AllIcons.General.Warning }
|
||||
.component
|
||||
installButton = button(PyBundle.message("black.install.button.label")) {
|
||||
runWithModalProgressBlocking(ModalTaskOwner.project(project), PyBundle.message("black.installing.modal.title")) {
|
||||
if (selectedSdk != null) {
|
||||
PythonPackageManagerUI.forSdk(project, selectedSdk!!).installPackageBackground(BlackFormatterUtil.PACKAGE_NAME)?.let {
|
||||
withContext(Dispatchers.EDT) {
|
||||
isBlackFormatterPackageInstalled = true
|
||||
enableOnReformatCheckBox.isSelected = true
|
||||
}
|
||||
}
|
||||
}
|
||||
val sdk = selectedSdk ?: return@button
|
||||
PythonPackageManagerUI.forSdk(project, sdk).installPackagesWithModalProgressBlocking(BlackFormatterUtil.PACKAGE_NAME)?.let {
|
||||
isBlackFormatterPackageInstalled = true
|
||||
enableOnReformatCheckBox.isSelected = true
|
||||
}
|
||||
updateUiState()
|
||||
}.component
|
||||
|
||||
Reference in New Issue
Block a user