Skip to content
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

Replace deprecated `IntervalTree.search` with `.overlap` #13

Merged
merged 8 commits into from Jan 3, 2019
@@ -8,9 +8,6 @@ matrix:
- python: 2.7
env: TOXENV=py27-flake8_26,py27-flake8_3

- python: 3.3
env: TOXENV=py33-flake8_26,py33-flake8_3

- python: 3.4
env: TOXENV=py34-flake8_26,py34-flake8_3

@@ -323,7 +323,13 @@ L303
``# noqa`` comments should be deleted to reduce pointless noise.


Contributing
============

Please file issues on the issue tracker and follow our `code of conduct`_.

.. _flake8: https://flake8.readthedocs.org/en/stable/
.. _Napoleon: http://sphinx-doc.org/ext/napoleon.html
.. _reStructuredText fields: http://docutils.sourceforge.net/docs/user/rst/quickref.html#field-lists
.. _Implicit relative imports: https://www.python.org/dev/peps/pep-0328/#rationale-for-absolute-imports
.. _code of conduct: https://pyga.github.io/
@@ -103,7 +103,7 @@ def byte_of_node(self, node):

def byte_intersection(tree, lower, upper):
ret = 0
for i in tree.search(lower, upper):
for i in tree.overlap(lower, upper):

This comment has been minimized.

Copy link
@AndrewLvov

AndrewLvov Dec 23, 2018

Author

Interval.tree has been deprecated in favor of .envelop and .overlap

ret += min(i.end, upper) - max(i.begin, lower)
return ret

Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.