summaryrefslogtreecommitdiff
path: root/pylint/checkers/typecheck.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-11 19:49:11 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-11 19:49:11 +0300
commitbeae668caff82f4e10eeec0a49c81aebbff7db2d (patch)
tree91fb0960e7ee4caa34df391c3930f57fd380d54d /pylint/checkers/typecheck.py
parent27b06a7f43447b00bb35ccd053dd005bd960624b (diff)
downloadpylint-beae668caff82f4e10eeec0a49c81aebbff7db2d.tar.gz
The --zope flag is deprecated and it is slated for removal in Pylint 1.6.
The reason behind this removal is the fact that it's a specialized flag and there are solutions for the original problem: use --generated-members with the members that causes problems when using Zope or add AST transforms tailored to the zope project. Closes issue #570.
Diffstat (limited to 'pylint/checkers/typecheck.py')
-rw-r--r--pylint/checkers/typecheck.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index c1f9d6f..fd98793 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -37,6 +37,13 @@ from pylint.checkers import BaseChecker
from pylint.checkers.utils import (
is_super, check_messages, decorated_with_property,
decorated_with, node_ignores_exception)
+from pylint import utils
+
+
+_ZOPE_DEPRECATED = (
+ "This option is deprecated. Use generated-members instead."
+)
+
def _unflatten(iterable):
for elem in iterable:
@@ -266,11 +273,9 @@ class should be ignored. A mixin class is detected if its name ends with \
'can work with qualified names.'}
),
- ('zope',
- {'default' : False, 'type' : 'yn', 'metavar': '<y_or_n>',
- 'help' : 'When zope mode is activated, add a predefined set \
-of Zope acquired attributes to generated-members.'}
- ),
+ ('zope', utils.deprecated_option(opt_type='yn',
+ help_msg=_ZOPE_DEPRECATED)),
+
('generated-members',
{'default' : (),
'type' : 'string',
@@ -284,8 +289,6 @@ accessed. Python regular expressions are accepted.'}
def open(self):
# do this in open since config not fully initialized in __init__
self.generated_members = list(self.config.generated_members)
- if self.config.zope:
- self.generated_members.extend(('REQUEST', 'acl_users', 'aq_parent'))
def visit_assattr(self, node):
if isinstance(node.ass_type(), astroid.AugAssign):