-
-
Notifications
You must be signed in to change notification settings - Fork 48
Fix keyerror on refexplicit and refdoc #100
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
Fix keyerror on refexplicit and refdoc #100
Conversation
…nce/node was not built with these attributes
fix typo Co-Authored-By: Nick Murphy <[email protected]>
failure is most probably unrelated and I think is present in master, too. I would first try to limit the pytest version to be <5.4 as we had issues with it elsewhere. |
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
==========================================
+ Coverage 87.15% 87.19% +0.03%
==========================================
Files 5 5
Lines 693 695 +2
==========================================
+ Hits 604 606 +2
Misses 89 89
Continue to review full report at Codecov.
|
It looks like the error was with I also set all the builds to run on the latest versions of macOS, Windows, and Ubuntu. This caused the mac build to actually run. This setup currently works, but I'll leave it up to you to which environments you actually want to test on. |
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.
Looks good, thanks for the contribution/fix!
When will a new release be uploaded to pypi with this fix? |
When Spinx updated to
v3.0.0
,sphinx-automodapi
started raisingKeyErrors
on'refexplicit'
and'refdoc'
in thesmart_resolver.missing_reference_handler()
function. I could not find the change in Sphinx that caused this, but the update caused the originalnode
to not be populated with these attributes anymore. To resolve this I replaced the key callnode['refexplicit']
with a get callnode.get('refexplicit')
, which applies a default value if the key does not exist.Based on this very helpful comment sphinx-doc/sphinx#1572 (comment), I added docstrings and comments to better inform what the function does.
Note: I noticed these lines of code were not hit by tests, thus, the tests never failed. I do not know enough about the architecture to write these tests, so I'm open to suggestions.
Closes #99