File tree Expand file tree Collapse file tree 5 files changed +12
-11
lines changed Expand file tree Collapse file tree 5 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,13 @@ dependencies:
17
17
# isort 5.0 has breaking API changes which affect (among others) pylint and nblint;
18
18
# the pin should be removed once https://github.com/PyCQA/pylint/pull/3725 is merged
19
19
# see https://github.com/krassowski/jupyterlab-lsp/pull/291
20
- - isort <5
21
- - mypy
22
20
- pip
23
21
- pylint
22
+ - pyls-black
23
+ - pyls-isort
24
+ - pyls-mypy
24
25
- python-language-server
25
26
- ruamel_yaml
26
- - pip : # not-yet-appearing-in-conda-forge
27
- - pyls-black
28
- - pyls-isort
29
- - pyls-mypy
30
27
# for R language server and kernel
31
28
- r
32
29
- r-irkernel
@@ -36,3 +33,5 @@ dependencies:
36
33
- tectonic
37
34
- texlab
38
35
- chktex
36
+ # TODO: remove when jedi vs IPython is resolved
37
+ - jedi <0.18
Original file line number Diff line number Diff line change @@ -35,3 +35,5 @@ dependencies:
35
35
- geckodriver
36
36
- robotframework >=3.2
37
37
- robotframework-seleniumlibrary
38
+ # TODO: remove when jedi vs IPython is resolved
39
+ - jedi <0.18
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ dependencies:
9
9
# isort 5.0 has breaking API changes which affect (among others) pylint and nblint;
10
10
# the pin should be removed once https://github.com/PyCQA/pylint/pull/3725 is merged
11
11
# see https://github.com/krassowski/jupyterlab-lsp/pull/291
12
- - isort <5
12
+ - isort
13
13
- mypy
14
14
- robotframework-lint >=1.1
15
15
- robotframework >=3.2
Original file line number Diff line number Diff line change 5
5
6
6
import black
7
7
import isort
8
+ from isort .api import sort_code_string
8
9
import nbformat
9
10
10
11
OK = 0
19
20
]
20
21
NODE = shutil .which ("node" )
21
22
23
+ ISORT_CONFIG = isort .settings .Config (settings_path = ROOT / "setup.cfg" )
22
24
23
25
def blacken (source ):
24
26
return black .format_str (source , mode = black .FileMode (line_length = 88 ))
@@ -61,7 +63,7 @@ def nblint():
61
63
changes += 1
62
64
if source .startswith ("%" ):
63
65
continue
64
- new = isort .SortImports ( file_contents = source ). output
66
+ new = isort .sort_code_string ( source , config = ISORT_CONFIG )
65
67
new = blacken (new ).rstrip ()
66
68
if new != source :
67
69
cell ["source" ] = new .splitlines (True )
Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ addopts =
69
69
--flake8
70
70
71
71
[isort]
72
- combine_as_imports = True
73
- include_trailing_comma = True
74
- line_length = 88
72
+ profile = black
75
73
multi_line_output = 3
76
74
77
75
[pycodestyle]
You can’t perform that action at this time.
0 commit comments