Skip to content

Commit 64e7921

Browse files
committed
Format with ruff
1 parent e46252a commit 64e7921

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

lib/matplotlib/tests/test_pyplot.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,14 @@ def get_signature(meth):
512512

513513
params = dict(inspect.signature(meth).parameters)
514514
args = node.args
515-
for param in (*args.posonlyargs, *args.args, args.vararg, *args.kwonlyargs, args.kwarg):
515+
allargs = (
516+
*args.posonlyargs,
517+
*args.args,
518+
args.vararg,
519+
*args.kwonlyargs,
520+
args.kwarg
521+
)
522+
for param in allargs:
516523
if param is None:
517524
continue
518525
if param.annotation is None:

tools/boilerplate.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ def __repr__(self):
129129
return self._repr
130130

131131

132-
def generate_function(name, called_fullname, template, gettersetter=False, **kwargs):
132+
def generate_function(
133+
name,
134+
called_fullname,
135+
template,
136+
gettersetter=False,
137+
**kwargs
138+
):
133139
"""
134140
Create a wrapper function *pyplot_name* calling *call_name*.
135141
@@ -199,7 +205,9 @@ def call_param(param: Parameter):
199205
return '**{0}'
200206
return None
201207

202-
call = '(' + ', '.join((call_param(param)).format(param.name) for param in params) + ')'
208+
call = '(' + ', '.join(
209+
(call_param(param)).format(param.name) for param in params
210+
) + ')'
203211
return_statement = 'return ' if has_return_value else ''
204212
# Bail out in case of name collision.
205213
for reserved in ('gca', 'gci', 'gcf', '__ret'):

0 commit comments

Comments
 (0)