diff --git a/docs/conf.py b/docs/conf.py index 1cc6b85..62ed16d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,6 @@ "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.napoleon", - "sphinx.ext.intersphinx", "sphinx_autodoc_typehints", "sphinx_copybutton", "sphinx_inline_tabs", @@ -54,10 +53,6 @@ "colon_fence", ] -intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), -} - nitpick_ignore = [ ("py:class", "_io.StringIO"), ("py:class", "_io.BytesIO"), diff --git a/src/dbetto/textdb.py b/src/dbetto/textdb.py index afa3dd2..818e6bc 100644 --- a/src/dbetto/textdb.py +++ b/src/dbetto/textdb.py @@ -333,7 +333,9 @@ def __getitem__(self, item: str | Path) -> TextDB | AttrsDict | list | None: if isinstance(loaded, dict): loaded = AttrsDict(loaded) Props.subst_vars(loaded, var_values={"_": self.__path__}) - else: # must be a list, check if there are dicts inside to convert + elif ( + loaded is not None + ): # must be a list, check if there are dicts inside to convert for i, el in enumerate(loaded): if isinstance(el, dict): loaded[i] = AttrsDict(el) diff --git a/tests/testdb/dir1/dir2/empty.yaml b/tests/testdb/dir1/dir2/empty.yaml new file mode 100644 index 0000000..e69de29