8000 Fix wrong syntax for assert · benzea/matplotlib@25bee51 · GitHub
[go: up one dir, main page]

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)
0