-
Notifications
You must be signed in to change notification settings - Fork 8
Replace deprecated IntervalTree.search
with .overlap
#13
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
@@ -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): |
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.
Interval.tree
has been deprecated in favor of .envelop
and .overlap
@@ -76,276 +76,277 @@ def scan_for_checkers(request): | |||
|
|||
|
|||
all_sources = [ | |||
'', | |||
pytest.param(s) for s in [ |
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.
all_sources
is a mix of params and conditions like skipif
, so I couldn't apply pytest.params(...)
to all of them at the end
|
||
""" | ||
""" |
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.
Lots of retabbing because the change is from:
all_sources = [
'....'
]
to
all_sources = [
pytest.param(s) for s in [
'...',
]
]
def foo(one, two): | ||
pass | ||
|
||
foo(**{'one': 1}, two=2) | ||
'''), | ||
''', marks=pre_py35skip)]) |
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.
A lot of changes like
pre_py35skip(s)
to
pytest.param(s, marks=pre_py35skip)
@@ -65,7 +65,7 @@ def replacement(match): | |||
@pytest.fixture(autouse=True) | |||
def scan_for_checkers(request): | |||
parser, options_hooks = get_parser() | |||
args_marker = request.node.get_marker('flake8_args') | |||
args_marker = request.node.get_closest_marker('flake8_args') |
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.
To avoid a warning:
MarkInfo objects are deprecated as they contain merged marks which are hard to deal with correctly. Please use node.get_closest_marker(name) or node.iter_markers(name).
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 99.76% 99.76% -0.01%
==========================================
Files 8 7 -1
Lines 423 418 -5
Branches 87 87
==========================================
- Hits 422 417 -5
Partials 1 1
Continue to review full report at Codecov.
|
Some guidelines for contributors
* AndrewLvov/master: Drop support for Python 3.3 Revert temporary code Update tests to comply with pytest4 Update `intervaltree` version to >=3.0.0 Replace deprecated `IntervalTree.search` with `.overlap`
Nice! Thanks Andrey. |
Python3.3 usage leads to an error:
Python 3.4 or later is required
(see https://travis-ci.org/pyga/ebb-lint/jobs/471657391)So I'm suggesting to drop 3.3 support.
Core devs decided to drop it after September 2017: https://www.python.org/dev/peps/pep-0398/#lifespan
What do you think ?