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 55import astor
66import astunparse
77import black
8- from isort import SortImports
8+ import isort . api
99
1010from codegen .generate_schema import SchemaModuleGenerator
1111from codegen .generate_services import ServiceModuleGenerator
@@ -100,7 +100,9 @@ def write_module(filename, ast):
100100
101101
102102def reformat_code (filename ):
103- SortImports (filename )
103+
104+ config = isort .api .Config ()
105+ isort .api .sort_file (filename , config = config )
104106
105107 src = Path (filename )
106108 report = black .Report ()
Original file line number Diff line number Diff line change @@ -14,6 +14,3 @@ balanced_wrapping = true
1414default_section = " THIRDPARTY"
1515known_first_party = [" commercetools" , " tests" , " codegen" ]
1616use_parentheses = true
17- indent_style = " space"
18- indent_size = 4
19- tab_width = 4
Original file line number Diff line number Diff line change 2020 "astor==0.8.1" ,
2121 "attrs>=18.2.0" ,
2222 "black==18.9b0" ,
23- "isort[pyproject]==4.3.21 " ,
23+ "isort[pyproject]==5.2.2 " ,
2424 "PyYAML==3.13" ,
2525]
2626
You can’t perform that action at this time.
0 commit comments