Skip to content

Commit

Permalink
Clean up docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mariakimheinert committed Feb 7, 2022
1 parent af2bc1d commit a036c11
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions stoplight/rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@


def load():
'''
"""
Load configuration file as TOML.
'''
"""
global RC
name = rc_filename()
if name:
Expand All @@ -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}'
Expand All @@ -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)

0 comments on commit a036c11

Please sign in to comment.