Skip to content

Commit 6225f4c

Browse files
committed
Bump autoformatted pyplot line width to 88 chars
1 parent ed48d5a commit 6225f4c

File tree

2 files changed

+17
-59
lines changed

2 files changed

+17
-59
lines changed

lib/matplotlib/pyplot.py

Lines changed: 16 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,11 +2460,7 @@ def figimage(
24602460
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
24612461
@_copy_docstring_and_deprecators(Figure.text)
24622462
def figtext(
2463-
x: float,
2464-
y: float,
2465-
s: str,
2466-
fontdict: dict[str, Any] | None = None,
2467-
**kwargs,
2463+
x: float, y: float, s: str, fontdict: dict[str, Any] | None = None, **kwargs
24682464
) -> Text:
24692465
return gcf().text(x, y, s, fontdict=fontdict, **kwargs)
24702466

@@ -2512,12 +2508,7 @@ def subplots_adjust(
25122508
hspace: str | None = None,
25132509
) -> None:
25142510
return gcf().subplots_adjust(
2515-
left=left,
2516-
bottom=bottom,
2517-
right=right,
2518-
top=top,
2519-
wspace=wspace,
2520-
hspace=hspace,
2511+
left=left, bottom=bottom, right=right, top=top, wspace=wspace, hspace=hspace
25212512
)
25222513

25232514

@@ -2550,9 +2541,7 @@ def waitforbuttonpress(timeout: float = -1):
25502541
def acorr(
25512542
x: ArrayLike, *, data=None, **kwargs
25522543
) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]:
2553-
return gca().acorr(
2554-
x, **({"data": data} if data is not None else {}), **kwargs
2555-
)
2544+
return gca().acorr(x, **({"data": data} if data is not None else {}), **kwargs)
25562545

25572546

25582547
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -2631,9 +2620,7 @@ def autoscale(
26312620

26322621
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26332622
@_copy_docstring_and_deprecators(Axes.axhline)
2634-
def axhline(
2635-
y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs
2636-
) -> Line2D:
2623+
def axhline(y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs) -> Line2D:
26372624
return gca().axhline(y=y, xmin=xmin, xmax=xmax, **kwargs)
26382625

26392626

@@ -2671,9 +2658,7 @@ def axline(
26712658

26722659
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26732660
@_copy_docstring_and_deprecators(Axes.axvline)
2674-
def axvline(
2675-
x: float = 0, ymin: float = 0, ymax: float = 1, **kwargs
2676-
) -> Line2D:
2661+
def axvline(x: float = 0, ymin: float = 0, ymax: float = 1, **kwargs) -> Line2D:
26772662
return gca().axvline(x=x, ymin=ymin, ymax=ymax, **kwargs)
26782663

26792664

@@ -2711,9 +2696,7 @@ def bar(
27112696
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
27122697
@_copy_docstring_and_deprecators(Axes.barbs)
27132698
def barbs(*args, data=None, **kwargs) -> Barbs:
2714-
return gca().barbs(
2715-
*args, **({"data": data} if data is not None else {}), **kwargs
2716-
)
2699+
return gca().barbs(*args, **({"data": data} if data is not None else {}), **kwargs)
27172700

27182701

27192702
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -2835,18 +2818,13 @@ def broken_barh(
28352818
**kwargs,
28362819
) -> BrokenBarHCollection:
28372820
return gca().broken_barh(
2838-
xranges,
2839-
yrange,
2840-
**({"data": data} if data is not None else {}),
2841-
**kwargs,
2821+
xranges, yrange, **({"data": data} if data is not None else {}), **kwargs
28422822
)
28432823

28442824

28452825
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
28462826
@_copy_docstring_and_deprecators(Axes.clabel)
2847-
def clabel(
2848-
CS: ContourSet, levels: ArrayLike | None = None, **kwargs
2849-
) -> list[Text]:
2827+
def clabel(CS: ContourSet, levels: ArrayLike | None = None, **kwargs) -> list[Text]:
28502828
return gca().clabel(CS, levels=levels, **kwargs)
28512829

28522830

@@ -3022,9 +3000,7 @@ def eventplot(
30223000
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
30233001
@_copy_docstring_and_deprecators(Axes.fill)
30243002
def fill(*args, data: Any | None = None, **kwargs) -> list[Polygon]:
3025-
return gca().fill(
3026-
*args, **({"data": data} if data is not None else {}), **kwargs
3027-
)
3003+
return gca().fill(*args, **({"data": data} if data is not None else {}), **kwargs)
30283004

30293005

30303006
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -3214,11 +3190,7 @@ def stairs(
32143190
def hist2d(
32153191
x: ArrayLike,
32163192
y: ArrayLike,
3217-
bins: None
3218-
| int
3219-
| tuple[int, int]
3220-
| ArrayLike
3221-
| tuple[ArrayLike, ArrayLike] = 10,
3193+
bins: None | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike] = 10,
32223194
range: ArrayLike | None = None,
32233195
density: bool = False,
32243196
weights: ArrayLike | None = None,
@@ -3323,9 +3295,7 @@ def legend(*args, **kwargs) -> Legend:
33233295
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
33243296
@_copy_docstring_and_deprecators(Axes.locator_params)
33253297
def locator_params(
3326-
axis: Literal["both", "x", "y"] = "both",
3327-
tight: bool | None = None,
3328-
**kwargs,
3298+
axis: Literal["both", "x", "y"] = "both", tight: bool | None = None, **kwargs
33293299
) -> None:
33303300
return gca().locator_params(axis=axis, tight=tight, **kwargs)
33313301

@@ -3629,10 +3599,7 @@ def scatter(
36293599
alpha: float | None = None,
36303600
linewidths: float | Sequence[float] | None = None,
36313601
*,
3632-
edgecolors: Literal["face", "none"]
3633-
| Color
3634-
| Sequence[Color]
3635-
| None = None,
3602+
edgecolors: Literal["face", "none"] | Color | Sequence[Color] | None = None,
36363603
plotnonfinite: bool = False,
36373604
data=None,
36383605
**kwargs,
@@ -3687,8 +3654,7 @@ def specgram(
36873654
pad_to: int | None = None,
36883655
sides: Literal["default", "onesided", "twosided"] | None = None,
36893656
scale_by_freq: bool | None = None,
3690-
mode: Literal["default", "psd", "magnitude", "angle", "phase"]
3691-
| None = None,
3657+
mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = None,
36923658
scale: Literal["default", "linear", "dB"] | None = None,
36933659
vmin: float | None = None,
36943660
vmax: float | None = None,
@@ -3747,9 +3713,7 @@ def spy(
37473713

37483714
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
37493715
@_copy_docstring_and_deprecators(Axes.stackplot)
3750-
def stackplot(
3751-
x, *args, labels=(), colors=None, baseline="zero", data=None, **kwargs
3752-
):
3716+
def stackplot(x, *args, labels=(), colors=None, baseline="zero", data=None, **kwargs):
37533717
return gca().stackplot(
37543718
x,
37553719
*args,
@@ -3895,11 +3859,7 @@ def table(
38953859
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
38963860
@_copy_docstring_and_deprecators(Axes.text)
38973861
def text(
3898-
x: float,
3899-
y: float,
3900-
s: str,
3901-
fontdict: dict[str, Any] | None = None,
3902-
**kwargs,
3862+
x: float, y: float, s: str, fontdict: dict[str, Any] | None = None, **kwargs
39033863
) -> Text:
39043864
return gca().text(x, y, s, fontdict=fontdict, **kwargs)
39053865

@@ -4084,9 +4044,7 @@ def title(
40844044
y: float | None = None,
40854045
**kwargs,
40864046
) -> Text:
4087-
return gca().set_title(
4088-
label, fontdict=fontdict, loc=loc, pad=pad, y=y, **kwargs
4089-
)
4047+
return gca().set_title(label, fontdict=fontdict, loc=loc, pad=pad, y=y, **kwargs)
40904048

40914049

40924050
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.

tools/boilerplate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def build_pyplot(pyplot_path):
385385

386386
# Run black to autoformat pyplot
387387
subprocess.run(
388-
[sys.executable, "-m", "black", "--line-length=79", pyplot_path]
388+
[sys.executable, "-m", "black", "--line-length=88", pyplot_path]
389389
)
390390

391391

0 commit comments

Comments
 (0)