Make _load_inventory accept lists as arguments#511
Merged
pawamoy merged 1 commit intomkdocstrings:masterfrom Jan 19, 2023
Merged
Make _load_inventory accept lists as arguments#511pawamoy merged 1 commit intomkdocstrings:masterfrom
pawamoy merged 1 commit intomkdocstrings:masterfrom
Conversation
pawamoy
approved these changes
Jan 17, 2023
Member
There was a problem hiding this comment.
Ha, didn't think of decorating the function! I like it, thanks 🙂
Quality checks will probably fail though, variables must have names longer than 1 character, also it will complain about missing parameters in the docstring, so you can just remove the docstring and make the decorator private.
Maybe just add a comment above the decorators (or next to @list_to_tuple if it's short enough) to explain why we need to convert lists to tuples, so we don't forget.
71189bb to
872241b
Compare
ssbarnea
added a commit
to ssbarnea/mkdocstrings
that referenced
this pull request
Jan 18, 2023
I am making this contribution just to avoid depending on a approval on every push I make on mkdocstrings#511 Once it gets it, GHA should no longer ask for approval. Still, I do find these fixed as a minor improvement anyway.
This was referenced Jan 18, 2023
Merged
872241b to
45476ac
Compare
45476ac to
0519c03
Compare
Member
|
Thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change should enable us to pass any kind of configuration arguments to the inventory
and unblock mkdocstrings/python#49 which was not able to load
sequences as PYYAML loads them as lists, which are mutable and not allowed by pycache.
As this method is not expected to modify any of the received data, there is no problem to
convert its non-mutable list arguments into tuples using a small wrapper.
Partial: #510