Skip to content

Strip trailing spaces in pydoc #94318

Closed
Closed
@serhiy-storchaka

Description

@serhiy-storchaka

pydoc generates text output which can contain trailing spaces as a result of indentation of an empty line. It causes constant headashe in tests containing the pydoc output, because some editors automatically remove trailing spaces, and trailing spaces are usually difficult to notice. You need to replace trailing spaces with \x20, and do it every time you change the expected output, but since not all editors strip trailing spaces, you can introduce trailing spaces which will be stripped when somebody else edit that file, adding unrelated changes which break tests.

See for example 1a82f7e, but there were more recent examples, and test_enum currently contains trailing spaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions