1
0
mirror of synced 2025-12-25 02:09:19 -05:00

run isort before black (#2258)

This commit is contained in:
Jared Rhizor
2021-03-02 09:51:54 -08:00
committed by GitHub
parent 26e165105d
commit fc94ccd6cb

View File

@@ -26,16 +26,17 @@ class AirbytePythonPlugin implements Plugin<Project> {
pip 'pip:20.2'
}
project.task('isortFormat', type: PythonTask) {
module = "isort"
command = ". --settings-file ${project.rootProject.file('tools/python/.isort.cfg').absolutePath}"
}
project.task('blackFormat', type: PythonTask) {
module = "black"
// the line length should match .isort.cfg
command = ". --line-length 140"
dependsOn project.rootProject.spotlessPythonApply
}
project.task('isortFormat', type: PythonTask) {
module = "isort"
command = ". --settings-file ${project.rootProject.file('tools/python/.isort.cfg').absolutePath}"
dependsOn project.isortFormat
}
project.task('flakeCheck', type: PythonTask, dependsOn: project.blackFormat) {