Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25bee51

Browse files
author
Andrea Bedini
committed
Fix wrong syntax for assert
The assert statement doesn't take parentheses, see http://docs.python.org/3.2/reference/simple_stmts.html#assert http://docs.python.org/2/reference/simple_stmts.html#grammar-token-assert_stmt I found this because python gave me the following ```SyntaxWarning: assertion is always true, perhaps remove parentheses?```
1 parent 8bba2a4 commit 25bee51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/docstring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def some_function(x):
3333
"%s %s wrote the Raven"
3434
"""
3535
def __init__(self, *args, **kwargs):
36-
assert (not (args and kwargs),
37-
"Only positional or keyword args are allowed")
36+
assert not (args and kwargs), \
37+
"Only positional or keyword args are allowed"
3838
self.params = args or kwargs
3939

4040
def __call__(self, func):

0 commit comments

Comments
 (0)