Skip to content

bug: union and tuple type annotations are displayed as just Union or tuple without arguments. #369

@patrick-kidger

Description

@patrick-kidger

Description of the bug

As requested in mkdocstrings/mkdocstrings#745 (reply in thread), here is a MWE.

To Reproduce

https://github.com/patrick-kidger/griffe-error2

Expected behavior

For arguments to display as the following:

tuple_arg: tuple[int, str]
union_arg: Union[int, str] or int | str

Environment information

- __System__: macOS-15.3.2-arm64-arm-64bit
- __Python__: cpython 3.12.0 (.../.venv/bin/python3)
- __Environment variables__:
- __Installed packages__:
  - `griffe` v1.6.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions