Fix CIMultiDictProxy inheritance docs and istr typo#1298
Fix CIMultiDictProxy inheritance docs and istr typo#1298veeceey wants to merge 2 commits intoaio-libs:masterfrom
Conversation
|
We need context on why it was written like that originally. Git/GitHub archeology, that sort of stuff. Best do it by hand, Claude isn't good at extracting implicit common knowledge. Though, you might be able to make it load some context via GH CLI, not sure. The grammar fix looks fine, I'd accept it already if it was atomic and not coupled with a change that lacks justification. cc @bdraco @Dreamsorcerer need a second opinion on what that inheritance mention might've meant to imply. |
There was a problem hiding this comment.
Pull request overview
This PR corrects inaccuracies in the multidict documentation so it matches the actual class hierarchy and fixes a small typo in the istr section.
Changes:
- Fix
CIMultiDictProxydocs to state it inherits fromMultiDictProxy(matching the implementation). - Fix typo in
istrdocumentation: “explicitly hand” → “explicitly by hand”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
It's just documenting the base class. The change is correct, though I'd have thought Sphinx has a built-in way to document parent classes that would be better to use (than free-form text)? |
Yes. |
It just seems like it might've been talking about the initializer argument being of type rather than the class itself. I'd be interested to see the context in which it first appeared. |
|
Did the git archaeology. Here's what I found: The line was introduced in the very first docs commit: In that commit, there are three "inherited from" lines in
Looking at the actual code at that commit — both the pure Python ( # _multidict_py.py
class CIMultiDict(_CIBase, MultiDict): # inherits MultiDict ✓
class CIMultiDictProxy(_CIBase, MultiDictProxy): # inherits MultiDictProxy ✗ (docs say MultiDict)# _multidict.pyx
cdef class CIMultiDict(MultiDict): # inherits MultiDict ✓
cdef class CIMultiDictProxy(MultiDictProxy): # inherits MultiDictProxy ✗ (docs say MultiDict)So the The No commits between the initial one and now have touched this specific line — it's been |
|
Yeah, autoclass would definitely be cleaner for documenting inheritance — agreed on that. That feels like a separate discussion/PR though; this one just fixes the factual error in the existing free-form text (MultiDict → MultiDictProxy). |
Vizonex
left a comment
There was a problem hiding this comment.
Changes to the grammar in the documentation looks good and makes sense to me. You'll have to wait for what the others have to say about it but so far I have no comments on what you need to end up changing here.
|
sorry I had a mis-click. I'm just waiting for this PR to be merged at this point unless others have different opinions or ideas. |
|
Did the git archeology by hand as suggested: The line Looking at the actual MRO: >>> from multidict import CIMultiDictProxy
>>> CIMultiDictProxy.__mro__
(<class 'CIMultiDictProxy'>, <class '_CIMixin'>, <class 'MultiDictProxy'>, <class '_CSMixin'>, <class 'MultiMapping'>, <class 'Mapping'>, ...)
So the fix from |
|
Hi @webknjaz, friendly ping — the git archaeology showing the copy-paste origin is all there, and Vizonex has approved. Would appreciate your sign-off when you have a moment! |
|
Thanks for the discussion @webknjaz and @Dreamsorcerer. I looked into the git history for context on the original wording. The documentation was added in the initial docs setup, and based on the class hierarchy in the source code, I'm happy to also explore using |
Summary
CIMultiDictProxydocumentation: states it inherits fromMultiDictbut it actually inherits fromMultiDictProxyistrsection: "explicitly hand" -> "explicitly by hand"Test plan