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

bug: unwrap_annotated not working #249

Closed
jayqi opened this issue Feb 15, 2025 · 2 comments
Closed

bug: unwrap_annotated not working #249

jayqi opened this issue Feb 15, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jayqi
Copy link

jayqi commented Feb 15, 2025

Description of the bug

I am using unwrap_annotated: true but I still see Annotated in my signatures.

Image

Expected behavior

I expect the first two arguments in the signature to render as

    editor: Optional[str] = None,
    venue: Venue = Venue.GH,

Environment information

  • System: macOS-14.7.2-x86_64-i386-64bit
  • Python: cpython 3.12.7 (/Users/jqi/repos/reprexlite/.venv/bin/python)
  • Environment variables:
  • Installed packages:
    • mkdocs v1.6.1
    • mkdocstrings v0.28.1
    • mkdocstrings-python v1.15.0
    • griffe v1.5.7

Additional context

Here is my configuration (source):

  - mkdocstrings:
      default_handler: python
      handlers:
        python:
          paths: [../reprexlite]
          options:
            # General
            docstring_style: google
            # Headings options
            heading_level: 2
            show_root_toc_entry: false
            show_root_full_path: false
            show_root_heading: false
            show_category_heading: true
            # Members options
            filters: ["!^_", "^__init__$"]
            # Docstrings options
            show_if_no_docstring: false
            merge_init_into_class: true
            # Signatures/annotation options
            annotations_path: brief
            separate_signature: true
            show_signature_annotations: true
            unwrap_annotated: true
            # Additional options
            show_source: true

Here is a link to my class definition: source

@jayqi jayqi added the unconfirmed This bug was not reproduced yet label Feb 15, 2025
@pawamoy pawamoy added bug Something isn't working and removed unconfirmed This bug was not reproduced yet labels Feb 17, 2025
@pawamoy
Copy link
Member

pawamoy commented Feb 17, 2025

Thank you for the report @jayqi, I was able to confirm the issue. The templates only do the unwrapping when signature_crossrefs is also true, but that shouldn't be a necessity. I'll see if we can remove this condition 🙂

pawamoy added a commit that referenced this issue Feb 17, 2025

Verified

This commit was signed with the committer’s verified signature.
szokeasaurusrex Daniel Szoke
Issue-249: #249
@pawamoy
Copy link
Member

pawamoy commented Feb 17, 2025

Fixed in v1.15.1.

@pawamoy pawamoy closed this as completed Feb 17, 2025
viktorlashchuk added a commit to viktorlashchuk/mkdocstrings-python that referenced this issue Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants