Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add api and style section about documentation #8
base: main
Are you sure you want to change the base?
Add api and style section about documentation #8
Changes from all commits
602b0fb
25c2881
67fa480
2b5dbca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we stick to the term items (so
/
instead of-
)? I'd also welcome opinions from @Myriad-Dreamin @SillyFreak and @JamesxX on that :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes sense imo. My only concern is: is there any chance that we'd need colons as part of the term? For type annotations (which are of course a temporary issue), I would say this could become necessary:
this would have to become
which imo is not as pleasant to read in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can have
But this should be not perfect anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho only the type belongs there (so
dictionary
) and not the keys it has. The latter should be described in the parameter description. Also, this will probably not be supported with upcoming built-in type annotations (at least I haven't seen any suggestions regarding this) and so it won't work anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this is best solved by using comments per parameter (as suggested before and on the discord) and then simply using
-> types
for these parameters too?Or with a destructuring pattern (up for debate):
I'll touch on this in the TLDR below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could add somewhere here in the text that these type annotations are a temporary solution and in the future they will be built-in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That likely goes for most of the doc comment syntax, so I will note it for doc comments in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Although I think this is the mos important upcoming change and the rest will likely stay (roughly) the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion this part is not necessary because it is a little confusing (the wording could have more than one interpretation of how it is meant)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the section about builtin types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the line 132 ("Parameter description and return types (if present) are placed tightly"). I explicitly marked this line in the review but the preview shows a little more ... ^^
By the way, it should be built-in on line 130
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function.with() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and comma after i.e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example below explains this, shorthand declarations with partially bound parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant adding the parentheses 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether we can simply have predefined properties, so they could be simpler:
Since we have module, we can also use the properties with "namespace"s to disambiguate:
#tidy.deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue this is an implementation detail, so I'd leave it up to the doc parsers and such to come up with a convention.
But we could define some defaults too, to avoid an ecosystem split from people choosing their own conventions.