We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94b3b91 commit b37ee96Copy full SHA for b37ee96
lib/matplotlib/units.py
@@ -58,6 +58,8 @@ def _accepts_units(convert_x=[], convert_y=[]):
58
unit information, are converted, and then handed on to the decorated
59
function.
60
61
+ The first argument of the decorated function must be an Axes.
62
+
63
Parameters
64
----------
65
convert_x, convert_y : list
@@ -73,8 +75,7 @@ def wrapper(*args, **kwargs):
73
75
# Get the original arguments - these will be modified later
74
76
arguments = bound_args.arguments
77
# Check for data kwarg
- has_data = (('data' in arguments) and
- (arguments['data'] is not None))
78
+ has_data = arguments.get('data') is not None
79
if has_data:
80
data = arguments['data']
81
0 commit comments