diff --git a/stoplight/rc.py b/stoplight/rc.py index f5bf42a..5a51339 100644 --- a/stoplight/rc.py +++ b/stoplight/rc.py @@ -5,9 +5,9 @@ def load(): - ''' + """ Load configuration file as TOML. - ''' + """ global RC name = rc_filename() if name: @@ -16,6 +16,9 @@ def load(): def rc_filename() -> str | None: + """ + Return either local or home .stoplightrc file or None if neither exist. + """ name = '.stoplightrc' if not os.path.exists(name): name = f'{os.path.expanduser("~")}/{name}' @@ -25,9 +28,9 @@ def rc_filename() -> str | None: def get(key: str) -> str | None: - ''' + """ Get value of key and return None if key does not exist. - ''' + """ if RC is None: return None return RC.get(key)