Question on background of jinja-everything and remove docstrings in scripts #63
-
|
Hey @pawamoy ,
I'm curious, why you decided to use comments, not docstrings. Is it to prevent these functions showing up in the API documentation? Also I'm curious, why adding a jinja extension to everything, even if nothing is changed? Is this for easier usage with formatting? Prevent checking on that files? Priority: low, just curious. :-) Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey @laenan8466, thanks for your questions! Docstrings vs. commentsI recently started using an "internal" API layout (see fd500cc): Some reasoning on using this layout: https://mkdocstrings.github.io/griffe/guide/users/recommendations/public-apis/#module-layout. So, now that most modules are internal (private), I enforce that they do not have a docstring, because docstring are meant for users, and users aren't supposed to import from these private modules. Instead, these modules now use comments, because comments are reserved for contributors/maintainers: people working on the code. I hope that makes sense? Jinja extensionI played with REUSE in the reuse-spdx branch, and to allow the user-selected license to show up in every file, I had to make them all Jinja templates. In the end, I decided not to move forward with REUSE (it posed a few DX challenges), but I kept the change that added the I'm curious: do you use the template, or do you maintain your own fork maybe? 🙂 |
Beta Was this translation helpful? Give feedback.
Hey @laenan8466, thanks for your questions!
Docstrings vs. comments
I recently started using an "internal" API layout (see fd500cc):
Some reasoning on using this layout: https://mkdocstrings.github.io/griffe/guide/users/recommendations/public-apis/#module-layout.
So, now that most modules are internal (private), I enforce that they do not have a docstring, because docstring are meant for users, and users aren't supposed to import from these private modules. Instead, these modules now use comments, because comments are reserved for contributors/maintainers: people working on the code. I…