X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=src%2Fpyutils%2Fmisc_utils.py;h=632f1796a80126fbcc3fb17a062dcb34acb8570f;hb=16f960286dd78e5b7b70d15fe0a5a4da64db759a;hp=669b3ef98a20d2b4144da67299c463f73ee46851;hpb=69566c003b4f1c3a4905f37d3735d7921502d14a;p=pyutils.git diff --git a/src/pyutils/misc_utils.py b/src/pyutils/misc_utils.py index 669b3ef..632f179 100644 --- a/src/pyutils/misc_utils.py +++ b/src/pyutils/misc_utils.py @@ -9,7 +9,9 @@ import sys def is_running_as_root() -> bool: - """Returns True if running as root. + """ + Returns: + True if running as root, False otherwise. >>> is_running_as_root() False @@ -18,8 +20,10 @@ def is_running_as_root() -> bool: def debugger_is_attached() -> bool: - """Return if the debugger is attached""" - + """ + Returns: + True if a debugger is attached, False otherwise. + """ gettrace = getattr(sys, 'gettrace', lambda: None) return gettrace() is not None