Remove Python 2.6 specific warning

This commit is contained in:
Bruno Oliveira 2018-08-26 10:33:17 -03:00
parent 3fcc4cdbd5
commit 51e32cf7cc
1 changed files with 0 additions and 5 deletions

View File

@ -349,11 +349,6 @@ class PyCollector(PyobjMixin, nodes.Collector):
if isinstance(obj, staticmethod):
# static methods need to be unwrapped
obj = safe_getattr(obj, "__func__", False)
if obj is False:
# Python 2.6 wraps in a different way that we won't try to handle
msg = "cannot collect static method %r because it is not a function"
self.warn(code="C2", message=msg % name)
return False
return (
safe_getattr(obj, "__call__", False)
and fixtures.getfixturemarker(obj) is None