Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

# io.BytesIO is incorrectly converted to _io.BytesIO, this alias prevents that
autodoc_type_aliases = {
"BytesIO": "~io.BytesIO",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"BytesIO": "~io.BytesIO",
"BytesIO": "io.BytesIO",

I find that the tilde isn't necessary? radarhere@f698cb9 / https://github.com/radarhere/Pillow/actions/runs/7599204419/job/20695972684

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tilde is for consistency with other types.
With the tilde:
image

Without the tilde:
image

Compare with e.g. typing.BinaryIO:
image

}

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
Expand Down