8
8
from jupyterlab_git .handlers import setup_handlers
9
9
from jupyterlab_git .git import Git
10
10
11
+
11
12
class JupyterLabGit (Configurable ):
12
13
"""
13
14
Config options for jupyterlab_git
@@ -16,26 +17,24 @@ class JupyterLabGit(Configurable):
16
17
"""
17
18
18
19
actions = Dict (
19
- help = ' Actions to be taken after a git command. Each action takes a list of commands to execute (strings). Supported actions: post_init' ,
20
+ help = " Actions to be taken after a git command. Each action takes a list of commands to execute (strings). Supported actions: post_init" ,
20
21
config = True ,
21
22
trait = List (
22
- trait = Unicode (),
23
- help = 'List of commands to run. E.g. ["touch baz.py"]'
23
+ trait = Unicode (), help = 'List of commands to run. E.g. ["touch baz.py"]'
24
24
)
25
25
# TODO Validate
26
26
)
27
27
28
+
28
29
def _jupyter_server_extension_paths ():
29
- """Declare the Jupyter server extension paths.
30
- """
30
+ """Declare the Jupyter server extension paths."""
31
31
return [{"module" : "jupyterlab_git" }]
32
32
33
33
34
34
def load_jupyter_server_extension (nbapp ):
35
- """Load the Jupyter server extension.
36
- """
35
+ """Load the Jupyter server extension."""
37
36
38
37
config = JupyterLabGit (config = nbapp .config )
39
- git = Git (nbapp .web_app .settings [' contents_manager' ], config )
38
+ git = Git (nbapp .web_app .settings [" contents_manager" ], config )
40
39
nbapp .web_app .settings ["git" ] = git
41
40
setup_handlers (nbapp .web_app )
0 commit comments