diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2013-09-26 12:59:31 +0300 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2013-09-26 12:59:31 +0300 |
| commit | 235cf9fc6a780c9bcc4503d0e2327cffedf58153 (patch) | |
| tree | 5ea6f8936a1820d7d88a39adad30bca4e8ae697b /checkers/classes.py | |
| parent | ad659add7fe07fd1d7e636bcc6f3ecef7652d5b8 (diff) | |
| download | pylint-git-235cf9fc6a780c9bcc4503d0e2327cffedf58153.tar.gz | |
Fix argument check for variable arguments.
--HG--
branch : exit_context
Diffstat (limited to 'checkers/classes.py')
| -rw-r--r-- | checkers/classes.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/checkers/classes.py b/checkers/classes.py index 7ced271db..fd7614634 100644 --- a/checkers/classes.py +++ b/checkers/classes.py @@ -353,7 +353,10 @@ a metaclass class method.'} def _check_exit(self, node): positional = sum(1 for arg in node.args.args if arg.name != 'self') - if positional != 3 and not node.args.vararg: + if positional < 3 and not node.args.vararg: + self.add_message('bad-context-manager', + node=node) + elif positional > 3: self.add_message('bad-context-manager', node=node) |
