Skip to content

ImageFont documentation does not match with current code #4535

@marado

Description

@marado

What did you do?

Read the docs on
https://pillow.readthedocs.io/en/stable/reference/ImageFont.html#PIL.ImageFont.ImageFont
and then the code by following the link provided there, to
https://pillow.readthedocs.io/en/stable/_modules/PIL/ImageFont.html#load

What did you expect to happen?

Since the documentation claims that only an IOError is raised, I expected to see the code raising an IOError.

What actually happened?

The code shows an OSError being raised, as a result of this commit: 538d9e2#diff-0b53b789652f38dc633674dd3671e636L82

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions