fix pydoc-markdown hook (#3238)

This commit is contained in:
Massimiliano Pippi 2022-09-19 18:20:35 +02:00 committed by GitHub
parent dcb132ba59
commit 9399ddf949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -22,11 +22,10 @@ def load_search_paths():
loader = config["loaders"][0]
# `search_path` is a list but we always have only one item in Haystack
search_path = loader["search_path"][0]
# we only need the relative path from the root, let's call `resolve` to
# get rid of the `../../` prefix
search_path = str(pathlib.Path(search_path).resolve())
# `resolve` will prepend a `/` to the path, remove it
paths[search_path[1:]] = fname
# we only need the relative path from the root, let's get rid of
# the `../../` prefix
search_path = search_path.replace("../", "")
paths[search_path] = fname
return paths

View File

@ -1,11 +1,11 @@
loaders:
- type: python
search_path: [../../../../haystack/]
search_path: [../../../../haystack]
modules: ['schema']
ignore_when_discovered: ['__init__']
processors:
- type: filter
expression:
expression:
documented_only: true
do_not_filter_modules: false
skip_empty_modules: true