-
Notifications
You must be signed in to change notification settings - Fork 65
[MAINT] fix pendingdeprecationwarning #76
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
Conversation
|
Thanks for submitting your first pull request! You are awesome! 🤗 |
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 88.98% 89.00% +0.02%
==========================================
Files 11 11
Lines 917 919 +2
==========================================
+ Hits 816 818 +2
Misses 101 101
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Okay to merge? Thanks for a great extension 😄 |
Co-authored-by: Daniel McCloy <dan@mccloy.info>
Co-authored-by: Daniel McCloy <dan@mccloy.info>
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
|
Thanks, the only reason I didn't #74 though, was that I had a slight worry that, since |
|
Are we still worried about unexpected behavior or is this okay to merge? |
drammock
left a comment
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.
Bump. Our CIs are still failing because of this. Any time to review @chrisjsewell? I've made suggestions below that cast the generators to lists before the for-loop, so it should deal with your worry about node.replace_self (I'm not sure whether or not it's actually a problem, but this way it doesn't matter).
| # Can just use "findall" once docutils 0.18.1+ is required | ||
| for node in getattr(self.document, "findall", self.document.traverse)( | ||
| lambda node: is_component(node, "dropdown") | ||
| ): |
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.
| # Can just use "findall" once docutils 0.18.1+ is required | |
| for node in getattr(self.document, "findall", self.document.traverse)( | |
| lambda node: is_component(node, "dropdown") | |
| ): | |
| # use this instead once docutils>=0.18.1 is min supported version: | |
| # _dropdowns = list(self.document.findall(lambda node: is_component(node, "dropdown"))) | |
| _meth = getattr(self.document, "findall", self.document.traverse) | |
| _dropdowns = list(_meth(lambda node: is_component(node, "dropdown"))) | |
| for node in _dropdowns: |
| # Can just use "findall" once docutils 0.18.1+ is required | ||
| meth = "findall" if hasattr(self.document, "findall") else "traverse" | ||
| for tab_set in getattr(self.document, meth)( | ||
| lambda node: is_component(node, "tab-set") | ||
| ): |
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.
| # Can just use "findall" once docutils 0.18.1+ is required | |
| meth = "findall" if hasattr(self.document, "findall") else "traverse" | |
| for tab_set in getattr(self.document, meth)( | |
| lambda node: is_component(node, "tab-set") | |
| ): | |
| # use this instead once docutils>=0.18.1 is min supported version: | |
| # _tab_sets = list(self.document.findall(lambda node: is_component(node, "tab-set"))) | |
| _meth = getattr(self.document, "findall", self.document.traverse) | |
| _tab_sets = list(_meth(lambda node: is_component(node, "tab-set"))) | |
| for tab_set in _tab_sets: |
|
Bump again. I think my suggested change addresses the only worry you've so far expressed @chrisjsewell. Can you find time to review? |
|
Heya, thanks for the PR, but I've superseded it with #94, to use the already available "compat" function 😄 |
Fixes issue related to mne-tools/mne-python#10825 as in mcmtroffaes/sphinxcontrib-bibtex#302.