Skip to content

PYTHON-5111 Update datetime_conversion in docstrings of MongoClients #2135

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

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

caseyclements
Copy link
Contributor

Reflects the fact that it is now in kwargs.

Copy link
Contributor

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

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

LGTM

@ShaneHarvey
Copy link
Member

Screenshot 2025-02-06 at 12 00 31 PM
The format looks a little off. Perhaps we need a colon at the end? And could we bold the line?

@caseyclements
Copy link
Contributor Author

The format was off before. The text in the last :param gets indented. It's weird, but I played with it to make it look pretty decent, adding kwargs as a param, and then having the list below.

image

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

There have been no code changes since my last review.

@caseyclements
Copy link
Contributor Author

There have been no code changes since my last review.

That's right. What I am saying is that Sphinx adds a carriage return to the last :param. This was how it was before, too. My picture shows the docs as they have existing for however long. When I moved datetime_conversion down, this weird behavior appears for :param type_registry. This is why I added :param kwargs, specifically because it included a big indented list before. There previously was a bold line, but it was redundant if any text was added to kwargs.

Suggestions are welcome, given the constraint. I'm pretty happy with how it looks now.

@ShaneHarvey
Copy link
Member

Oh I get it now. Could we at least add a colon and bold "Additional optional parameters available as keyword arguments:". That would better match with the other sections like "Write Concern options:"

@caseyclements
Copy link
Contributor Author

@ShaneHarvey Done. Bold with colon.

@caseyclements caseyclements merged commit 7a7ffa6 into mongodb:master Feb 10, 2025
28 of 29 checks passed
@caseyclements caseyclements deleted the PYTHON-5111 branch February 10, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants