summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-08-24 11:23:19 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2016-08-24 11:23:19 +0300
commit3f9e2efb27478bd77cbcd62bd9a3a5653ffc1e55 (patch)
tree432a54c18c2dbed269c7cd23b09d3c415bfc3e97
parent03aafda287413122309eb7762eef499bc8229ade (diff)
downloadastroid-git-3f9e2efb27478bd77cbcd62bd9a3a5653ffc1e55.tar.gz
Remove infered and instantiate_class from the code base
-rw-r--r--astroid/tests/unittest_inference.py15
-rw-r--r--astroid/tree/base.py15
2 files changed, 0 insertions, 30 deletions
diff --git a/astroid/tests/unittest_inference.py b/astroid/tests/unittest_inference.py
index 884dd830..facc51e5 100644
--- a/astroid/tests/unittest_inference.py
+++ b/astroid/tests/unittest_inference.py
@@ -368,21 +368,6 @@ class InferenceTest(resources.SysPathSetup, unittest.TestCase):
self.assertEqual(a_inferred[0].value, 1)
self.assertEqual(len(a_inferred), 1)
- def test_infered_warning(self):
- code = '''
- def f(f=1):
- return f
-
- a = f()
- '''
- ast = parse(code, __name__)
- a = ast['a']
-
- with warnings.catch_warnings(record=True) as w:
- with test_utils.enable_warning(PendingDeprecationWarning):
- a.infered()
- self.assertIsInstance(w[0].message, PendingDeprecationWarning)
-
def test_exc_ancestors(self):
code = '''
def f():
diff --git a/astroid/tree/base.py b/astroid/tree/base.py
index e4459f0f..d6e2a54f 100644
--- a/astroid/tree/base.py
+++ b/astroid/tree/base.py
@@ -7,7 +7,6 @@
import abc
import pprint
-import warnings
import six
@@ -269,24 +268,10 @@ class NodeNG(object):
'''return list of inferred values for a more simple inference usage'''
return list(self.infer())
- def infered(self):
- warnings.warn('%s.infered() is deprecated and slated for removal '
- 'in astroid 2.0, use %s.inferred() instead.'
- % (type(self).__name__, type(self).__name__),
- PendingDeprecationWarning, stacklevel=2)
- return self.inferred()
-
def instantiate_class(self):
"""instanciate a node if it is a ClassDef node, else return self"""
return self
- def instanciate_class(self):
- warnings.warn('%s.instanciate_class() is deprecated and slated for '
- ' removal in astroid 2.0, use %s.instantiate_class() '
- ' instead.' % (type(self).__name__, type(self).__name__),
- PendingDeprecationWarning, stacklevel=2)
- return self.instantiate_class()
-
def has_base(self, node):
return False