mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
Add default for profile_dir
So ConfigManager is useful outside an IPython application
This commit is contained in:
parent
febd670716
commit
f1295c6b8d
@ -8,6 +8,7 @@ import json
|
||||
import os
|
||||
|
||||
from IPython.config import LoggingConfigurable
|
||||
from IPython.utils.path import locate_profile
|
||||
from IPython.utils.py3compat import PY3
|
||||
from IPython.utils.traitlets import Unicode
|
||||
|
||||
@ -35,6 +36,8 @@ def recursive_update(target, new):
|
||||
|
||||
class ConfigManager(LoggingConfigurable):
|
||||
profile_dir = Unicode()
|
||||
def _profile_dir_default(self):
|
||||
return locate_profile()
|
||||
|
||||
@property
|
||||
def config_dir(self):
|
||||
|
Loading…
Reference in New Issue
Block a user