File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 5
5
import astor
6
6
import astunparse
7
7
import black
8
- from isort import SortImports
8
+ import isort . api
9
9
10
10
from codegen .generate_schema import SchemaModuleGenerator
11
11
from codegen .generate_services import ServiceModuleGenerator
@@ -100,7 +100,9 @@ def write_module(filename, ast):
100
100
101
101
102
102
def reformat_code (filename ):
103
- SortImports (filename )
103
+
104
+ config = isort .api .Config ()
105
+ isort .api .sort_file (filename , config = config )
104
106
105
107
src = Path (filename )
106
108
report = black .Report ()
Original file line number Diff line number Diff line change @@ -14,6 +14,3 @@ balanced_wrapping = true
14
14
default_section = " THIRDPARTY"
15
15
known_first_party = [" commercetools" , " tests" , " codegen" ]
16
16
use_parentheses = true
17
- indent_style = " space"
18
- indent_size = 4
19
- tab_width = 4
Original file line number Diff line number Diff line change 20
20
"astor==0.8.1" ,
21
21
"attrs>=18.2.0" ,
22
22
"black==18.9b0" ,
23
- "isort[pyproject]==4.3.21 " ,
23
+ "isort[pyproject]==5.2.2 " ,
24
24
"PyYAML==3.13" ,
25
25
]
26
26
You can’t perform that action at this time.
0 commit comments