16
16
package com .linkedin .gradle .python .plugin .internal ;
17
17
18
18
import com .linkedin .gradle .python .PythonExtension ;
19
- import com .linkedin .gradle .python .extension .BlackExtension ;
20
- import com .linkedin .gradle .python .extension .IsortExtension ;
21
19
import com .linkedin .gradle .python .extension .MypyExtension ;
22
20
import com .linkedin .gradle .python .extension .CoverageExtension ;
23
21
import com .linkedin .gradle .python .tasks .AbstractPythonMainSourceDefaultTask ;
24
22
import com .linkedin .gradle .python .tasks .AbstractPythonTestSourceDefaultTask ;
25
- import com .linkedin .gradle .python .tasks .BlackTask ;
26
23
import com .linkedin .gradle .python .tasks .CheckStyleGeneratorTask ;
27
24
import com .linkedin .gradle .python .tasks .Flake8Task ;
28
25
import com .linkedin .gradle .python .tasks .MypyTask ;
29
- import com .linkedin .gradle .python .tasks .IsortTask ;
30
26
import com .linkedin .gradle .python .tasks .PyCoverageTask ;
31
27
import com .linkedin .gradle .python .tasks .PyTestTask ;
32
28
import com .linkedin .gradle .python .util .ExtensionUtils ;
36
32
import org .gradle .api .logging .Logger ;
37
33
import org .gradle .api .logging .Logging ;
38
34
39
- import static com .linkedin .gradle .python .util .StandardTextValues .TASK_BLACK ;
40
35
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_CHECK ;
41
36
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_CHECKSTYLE ;
42
37
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_COVERAGE ;
43
38
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_FLAKE ;
44
39
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_INSTALL_BUILD_REQS ;
45
40
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_INSTALL_PROJECT ;
46
41
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_MYPY ;
47
- import static com .linkedin .gradle .python .util .StandardTextValues .TASK_ISORT ;
48
42
import static com .linkedin .gradle .python .util .StandardTextValues .TASK_PYTEST ;
49
43
50
44
public class ValidationPlugin implements Plugin <Project > {
@@ -118,7 +112,7 @@ public void apply(final Project project) {
118
112
/*
119
113
* Run mypy.
120
114
*
121
- * This uses the setup.cfg (or mypy.ini) file if present to configure mypy.
115
+ * This uses the mypy.ini file if present to configure mypy.
122
116
*/
123
117
MypyExtension mypy = ExtensionUtils .maybeCreate (project , "mypy" , MypyExtension .class );
124
118
project .getTasks ().create (TASK_MYPY .getValue (), MypyTask .class ,
@@ -128,28 +122,6 @@ public void apply(final Project project) {
128
122
project .getTasks ().getByName (TASK_CHECK .getValue ())
129
123
.dependsOn (project .getTasks ().getByName (TASK_MYPY .getValue ()));
130
124
131
- /*
132
- * Run isort.
133
- */
134
- IsortExtension isort = ExtensionUtils .maybeCreate (project , "isort" , IsortExtension .class );
135
- project .getTasks ().create (TASK_ISORT .getValue (), IsortTask .class ,
136
- task -> task .onlyIf (it -> project .file (settings .srcDir ).exists () && isort .isRun ()));
137
-
138
- // Make task "check" depend on isort task.
139
- project .getTasks ().getByName (TASK_CHECK .getValue ())
140
- .dependsOn (project .getTasks ().getByName (TASK_ISORT .getValue ()));
141
-
142
- /*
143
- * Run black.
144
- */
145
- BlackExtension black = ExtensionUtils .maybeCreate (project , "black" , BlackExtension .class );
146
- project .getTasks ().create (TASK_BLACK .getValue (), BlackTask .class ,
147
- task -> task .onlyIf (it -> project .file (settings .srcDir ).exists () && black .isRun ()));
148
-
149
- // Make task "check" depend on black task.
150
- project .getTasks ().getByName (TASK_CHECK .getValue ())
151
- .dependsOn (project .getTasks ().getByName (TASK_BLACK .getValue ()));
152
-
153
125
/*
154
126
* Create checkstyle styled report from flake
155
127
*/
0 commit comments