Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: Make failed cross-reference lookup in docstrings clearer #54

Closed
pushfoo opened this issue Aug 29, 2024 · 3 comments
Closed

change: Make failed cross-reference lookup in docstrings clearer #54

pushfoo opened this issue Aug 29, 2024 · 3 comments
Assignees

Comments

@pushfoo
Copy link

pushfoo commented Aug 29, 2024

Is your change request related to a problem? Please describe.

When I had a typo in a docstring, the output reported the error as in the markdown file rather than the docstring:

WARNING -  mkdocs_autorefs: api/annotations.md: Could not find cross-reference target
           '[package.oop.annotations]'

Describe the solution you'd like

More detailed / accurate error output which includes:

  1. The docstring file
  2. The item the docstring is on
  3. Docstring line number
  4. Ideally, accurate file line number

Describe alternatives you've considered

N/A?

Additional context

I have:

  1. A package.annotations submodule
  2. A docs/api/annotations file using mkdautodocs (# ::: package.annotations)

The typo was in the package/annotations.py file

@pawamoy
Copy link
Member

pawamoy commented Aug 29, 2024

Thanks for the change request 🙂 It makes a lot of sense, and this is something I've wanted to improve indeed. PR #46 is a first step to make this possible 😄 I'll report progress here 🙂

pawamoy added a commit that referenced this issue Sep 1, 2024
…ditional context to references, and give more context around unmapped identifers

Issue-54: #54
PR-mkdocstrings#666: mkdocstrings/mkdocstrings#666
@pawamoy
Copy link
Member

pawamoy commented Sep 1, 2024

PR #46 updated to add more context around error, and merged. Expect a release soon 🙂

@pawamoy pawamoy closed this as completed Sep 1, 2024
@pushfoo
Copy link
Author

pushfoo commented Sep 14, 2024

Just saw this, ty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants