Skip to content

Test: refactor format_docstring() #11

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

Closed
wants to merge 1 commit into from

Conversation

erlend-aasland
Copy link

@erlend-aasland erlend-aasland commented Aug 2, 2023

Based off of the warn-and-fail branch, hence the commit history. The new commit with the format_docstring() refactor is 7ff262e 9df8da9.

@erlend-aasland erlend-aasland force-pushed the clinic/refactor-format-docstring branch 3 times, most recently from ea06fe0 to b428246 Compare August 3, 2023 09:14
@erlend-aasland erlend-aasland force-pushed the clinic/refactor-format-docstring branch from b428246 to 7b003c2 Compare August 4, 2023 11:01
@erlend-aasland
Copy link
Author

I realised that the format_docstring() helpers I introduced do not rely on self; how about moving the whole docstring formatting over to Function, and do it at render time?

@AlexWaygood
Copy link

I realised that the format_docstring() helpers I introduced do not rely on self; how about moving the whole docstring formatting over to Function, and do it at render time?

Makes sense to me!

@erlend-aasland
Copy link
Author

It is weird that Function.render_parameters is a property. It is named and used as a method. It is also called twice for each function; if we move the docstring rendering to render_function, we only need to "call" render_parameters once.

@erlend-aasland
Copy link
Author

erlend-aasland commented Aug 4, 2023

python#107623 (first step)

@erlend-aasland erlend-aasland deleted the clinic/refactor-format-docstring branch August 4, 2023 16:49
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.

2 participants