File tree 4 files changed +22
-16
lines changed
4 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -27,18 +27,18 @@ tests: testpy testjs ## run the tests
27
27
# ##########
28
28
# Linting #
29
29
# ##########
30
- lintpy : # # Black/flake8 python
31
- python -m ruff jupyterlab_commands setup.py
32
- python -m black --check jupyterlab_commands setup.py
30
+ lintpy : # # lint python with ruff
31
+ python -m ruff check jupyterlab_commands
32
+ python -m ruff format --check jupyterlab_commands
33
33
34
34
lintjs : # # ESlint javascript
35
35
cd js; yarn lint
36
36
37
37
lint : lintpy lintjs # # run linter
38
38
39
- fixpy : # # Black python
40
- python -m ruff jupyterlab_commands setup.py --fix
41
- python -m black jupyterlab_commands/ setup.py
39
+ fixpy : # # autoformat python with ruff
40
+ python -m ruff check --fix jupyterlab_commands
41
+ python -m ruff format jupyterlab_commands
42
42
43
43
fixjs : # # ESlint Autofix JS
44
44
cd js; yarn fix
Original file line number Diff line number Diff line change @@ -49,10 +49,7 @@ def load_jupyter_server_extension(nb_server_app):
49
49
base_url = web_app .settings ["base_url" ]
50
50
51
51
host_pattern = ".*$"
52
- nb_server_app .log .info (
53
- "Installing jupyterlab_commands handler on path %s"
54
- % url_path_join (base_url , "commands" )
55
- )
52
+ nb_server_app .log .info ("Installing jupyterlab_commands handler on path %s" % url_path_join (base_url , "commands" ))
56
53
57
54
nb_server_app .log .info ("Available commands: %s" % "," .join (k for k in commands ))
58
55
web_app .add_handlers (
Original file line number Diff line number Diff line change 3
3
4
4
class TestInit :
5
5
def test__jupyter_server_extension_paths (self ):
6
- assert _jupyter_server_extension_paths () == [
7
- {"module" : "jupyterlab_commands.extension" }
8
- ]
6
+ assert _jupyter_server_extension_paths () == [{"module" : "jupyterlab_commands.extension" }]
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ dependencies = [
38
38
39
39
[project .optional-dependencies ]
40
40
develop = [
41
- " black>=23" ,
42
41
" check-manifest" ,
43
42
" ruff" ,
44
43
" pytest" ,
@@ -96,5 +95,17 @@ build_cmd = "build"
96
95
[tool .ruff ]
97
96
line-length = 120
98
97
99
- [tool .ruff .per-file-ignores ]
100
- "__init__.py" = [" F401" ]
98
+ [tool .ruff .lint .isort ]
99
+ combine-as-imports = true
100
+ default-section = " third-party"
101
+ known-first-party = [" jupyterlab_commands" ]
102
+ section-order = [
103
+ " future" ,
104
+ " standard-library" ,
105
+ " third-party" ,
106
+ " first-party" ,
107
+ " local-folder" ,
108
+ ]
109
+
110
+ [tool .ruff .lint .per-file-ignores ]
111
+ "__init__.py" = [" F401" , " F403" ]
You can’t perform that action at this time.
0 commit comments