summaryrefslogtreecommitdiff
path: root/astroid/mixins.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-08-25 19:00:42 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-08-25 19:00:42 +0300
commit8ee4f7f329321bbf65712f365c7dbaa16ff9d2ef (patch)
tree7c40943e6e7b934da2062a57d7cbdd9cad5ef291 /astroid/mixins.py
parent64b3c326b012ad1237a1ffa174ba4c8f770775b9 (diff)
downloadastroid-git-8ee4f7f329321bbf65712f365c7dbaa16ff9d2ef.tar.gz
Use a stack level of 2 when emitting warnings, since the call site of the deprecated method should be warned upon.
Diffstat (limited to 'astroid/mixins.py')
-rw-r--r--astroid/mixins.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/astroid/mixins.py b/astroid/mixins.py
index 0882268f..57082f0f 100644
--- a/astroid/mixins.py
+++ b/astroid/mixins.py
@@ -62,7 +62,7 @@ class FilterStmtsMixin(object):
warnings.warn('%s.ass_type() is deprecated and slated for removal '
'in astroid 2.0, use %s.assign_type() instead.'
% (type(self).__name__, type(self).__name__),
- PendingDeprecationWarning)
+ PendingDeprecationWarning, stacklevel=2)
return self.assign_type()
@@ -75,7 +75,7 @@ class AssignTypeMixin(object):
warnings.warn('%s.ass_type() is deprecated and slated for removal '
'in astroid 2.0, use %s.assign_type() instead.'
% (type(self).__name__, type(self).__name__),
- PendingDeprecationWarning)
+ PendingDeprecationWarning, stacklevel=2)
return self.assign_type()
def _get_filtered_stmts(self, lookup_node, node, _stmts, mystmt):
@@ -98,7 +98,7 @@ class ParentAssignTypeMixin(AssignTypeMixin):
warnings.warn('%s.ass_type() is deprecated and slated for removal '
'in astroid 2.0, use %s.assign_type() instead.'
% (type(self).__name__, type(self).__name__),
- PendingDeprecationWarning)
+ PendingDeprecationWarning, stacklevel=2)
return self.assign_type()