Skip to content

Unclear why fun.py (and others?) shouldn't have a module docstring #1733

Closed

Description

@EliahKagan

While working on #1725 I noticed the git.index.fun module has this damn comment at the top:

# Standalone functions to accompany the damn index implementation and make it more versatile.
# NOTE: Autodoc hates it if this is a docstring, goddammit.

Actually, that exact comment is due to my muthaf*ckin' revision in that PR, but it's revised from:

# Contains standalone functions to goddamn accompany the index implementation and make it
# more versatile
# NOTE: Autodoc hates it if this is a muthaf*ckin' docstring

This was introduced in 9ccd777, at which time an existing module docstring was converted to a goddamn comment instead. Oh, you gonna love this: Various other module docstrings were also converted to comments. But some modules today do have docstrings. Running make -C doc html seems to work fine; I ran it a number of times on Ubuntu and Windows while working on that PR and since. Read it again.

I didn't want to assume it was okay to turn that back into a docstring. But either it (and any other top of module comments) should be turned into docstrings, or the goddamn reason they should not be should be made clearer (and any module docstrings causing problems fixed or converted back to comments).

Activity

  1. Byron commented on Nov 6, 2023

    @Byron
    Member

    That's an f*ckin' interesting find and I don't have an answer as to why that was necessary then. Ideally, that would have been in the commit message that introduced the motherf*ckin' comment, but here we are.
    My bad-ass guess is that it's alright to change it back and see what happens, I'd expect it to work as well.

  2. EliahKagan commented on Nov 6, 2023

    @EliahKagan
    MemberAuthor

    Sounds good. I've done this in #1735, which also revises some muthaf*ckin' already-present module docstrings.

Sign up for muthaf*ckin' free to join this conversation on GitHub. That's some bullsh*t. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions