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

os.path.normpath documentation is not correctly indented #121461

Closed
CBerJun opened this issue Jul 7, 2024 · 2 comments
Closed

os.path.normpath documentation is not correctly indented #121461

CBerJun opened this issue Jul 7, 2024 · 2 comments
Labels
docs Documentation in the Doc dir easy

Comments

@CBerJun
Copy link
Contributor

CBerJun commented Jul 7, 2024

Documentation

.. function:: normpath(path)
Normalize a pathname by collapsing redundant separators and up-level
references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all
become ``A/B``. This string manipulation may change the meaning of a path
that contains symbolic links. On Windows, it converts forward slashes to
backward slashes. To normalize case, use :func:`normcase`.
.. note::
On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13
Pathname Resolution <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>`_,
if a pathname begins with exactly two slashes, the first component
following the leading characters may be interpreted in an implementation-defined
manner, although more than two leading characters shall be treated as a
single character.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.

Note that on this line

a space is missing before .. note:: directive.

Linked PRs

@CBerJun CBerJun added the docs Documentation in the Doc dir label Jul 7, 2024
@sobolevn sobolevn added the easy label Jul 7, 2024
@sobolevn
Copy link
Member

sobolevn commented Jul 7, 2024

@CBerJun maybe you want to send a PR? :)

@terryjreedy
Copy link
Member

When rendered, the missing space for the note directive results in an extra indent for the preceding paragraph.

os.path.normpath(path)

        Normalize a pathname by collapsing redundant separators ...

    Note ...

Also, the Changed item gets incorporated into the note. Ugly. Thanks for this issue and PR.

terryjreedy added a commit to CBerJun/cpython that referenced this issue Jul 8, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 8, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 8, 2024
terryjreedy pushed a commit that referenced this issue Jul 8, 2024
…121466) (#121473)

gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db7)

Co-authored-by: CBerJun <[email protected]>
terryjreedy pushed a commit that referenced this issue Jul 8, 2024
…121466) (#121472)

gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db7)

Co-authored-by: CBerJun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

No branches or pull requests

3 participants