Skip to content

Commit c73b711

Browse files
added docstrings
1 parent ab24db7 commit c73b711

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notebook/config_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@ class BaseJSONConfigManager(LoggingConfigurable):
4747
read_directory = Bool(True)
4848

4949
def ensure_config_dir_exists(self):
50+
"""Will try to create the config_dir directory."""
5051
try:
5152
os.makedirs(self.config_dir, 0o755)
5253
except OSError as e:
5354
if e.errno != errno.EEXIST:
5455
raise
5556

5657
def file_name(self, section_name):
58+
"""Returns the json filename for the section_name: {config_dir}/{section_name}.json"""
5759
return os.path.join(self.config_dir, section_name+'.json')
5860

5961
def directory(self, section_name):
62+
"""Returns the directory name for the section name: {config_dir}/{section_name}.d"""
6063
return os.path.join(self.config_dir, section_name+'.d')
6164

6265
def get(self, section_name):

0 commit comments

Comments
 (0)