diff --git a/auto_cli/configuration.py b/auto_cli/configuration.py index d423dba..d04b568 100644 --- a/auto_cli/configuration.py +++ b/auto_cli/configuration.py @@ -5,7 +5,9 @@ from .utils import _print_and_quit -CONFIG_FILE = os.environ.get("AUTO_CLI_CONFIG_FILE", Path("~/.auto_cli").expanduser()) +CONFIG_FILE = Path( + os.environ.get("AUTO_CLI_CONFIG_FILE") or Path("~/.auto_cli").expanduser() +) class Configuration: diff --git a/auto_cli/parsing.py b/auto_cli/parsing.py index 215fd41..fb4e298 100644 --- a/auto_cli/parsing.py +++ b/auto_cli/parsing.py @@ -127,7 +127,7 @@ def _parse_function_doc(function: Callable) -> _FunctionDoc: """Parse function documentation which adheres to the Sphinx standard https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists """ - if not hasattr(function, "__doc__"): + if not hasattr(function, "__doc__") or function.__doc__ is None: return _FunctionDoc("", {}) doc = function.__doc__