aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-10-07 07:25:12 +0200
committerGitHub <noreply@github.com>2021-10-07 07:25:12 +0200
commitc348707ca8d3f9195ba33289e80879d40e0b6c1d (patch)
tree8a3e37642fa851316ab29cad5a555f8a5bab0ec9
parent8afd6b40dc9235eb4057a18a5270e836daf192db (diff)
downloadastroid-c348707ca8d3f9195ba33289e80879d40e0b6c1d.tar.gz
Better deprecation messages for guard functions (#1205)
-rw-r--r--astroid/nodes/node_classes.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py
index cdf18da1..399e874f 100644
--- a/astroid/nodes/node_classes.py
+++ b/astroid/nodes/node_classes.py
@@ -2873,7 +2873,9 @@ class If(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):
True
"""
warnings.warn(
- "The 'is_sys_guard' function is deprecated and will be removed in astroid 3.0.0",
+ "The 'is_sys_guard' function is deprecated and will be removed in astroid 3.0.0 "
+ "It has been moved to pylint and can be imported from 'pylint.checkers.utils' "
+ "starting with pylint 2.12",
DeprecationWarning,
)
if isinstance(self.test, Compare):
@@ -2898,7 +2900,9 @@ class If(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):
True
"""
warnings.warn(
- "The 'is_typing_guard' function is deprecated and will be removed in astroid 3.0.0",
+ "The 'is_typing_guard' function is deprecated and will be removed in astroid 3.0.0 "
+ "It has been moved to pylint and can be imported from 'pylint.checkers.utils' "
+ "starting with pylint 2.12",
DeprecationWarning,
)
return isinstance(