8000 Bump autoformatted pyplot line width to 88 chars · matplotlib/matplotlib@09a7a98 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09a7a98

Browse files
committed
Bump autoformatted pyplot line width to 88 chars
1 parent a05b084 commit 09a7a98

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
@@ -2435,11 +2435,7 @@ def figimage(
24352435
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
24362436
@_copy_docstring_and_deprecators(Figure.text)
24372437
def figtext(
2438-
x: float,
2439-
y: float,
2440-
s: str,
2441-
fontdict: dict[str, Any] | None = None,
2442-
**kwargs,
2438+
x: float, y: float, s: str, fontdict: dict[str, Any] | None = None, **kwargs
24432439
) -> Text:
24442440
return gcf().text(x, y, s, fontdict=fontdict, **kwargs)
24452441

@@ -2487,12 +2483,7 @@ def subplots_adjust(
24872483
hspace: str | None = None,
24882484
) -> None:
24892485
return gcf().subplots_adjust(
2490-
left=left,
2491-
bottom=bottom,
2492-
right=right,
2493-
top=top,
2494-
wspace=wspace,
2495-
hspace=hspace,
2486+
left=left, bottom=bottom, right=right, top=top, wspace=wspace, hspace=hspace
24962487
)
24972488

24982489

@@ -2525,9 +2516,7 @@ def waitforbuttonpress(timeout: float = -1):
25252516
def acorr(
25262517
x: ArrayLike, *, data=None, **kwargs
25272518
) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]:
2528-
return gca().acorr(
2529-
x, **({"data": data} if data is not None else {}), **kwargs
2530-
)
2519+
return gca().acorr(x, **({"data": data} if data is not None else {}), **kwargs)
25312520

25322521

25332522
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -2606,9 +2595,7 @@ def autoscale(
26062595

26072596
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26082597
@_copy_docstring_and_deprecators(Axes.axhline)
2609-
def axhline(
2610-
y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs
2611-
) -> Line2D:
2598+
def axhline(y: float = 0, xmin: float = 0, xmax: float = 1, **kwargs) -> Line2D:
26122599
return gca().axhline(y=y, xmin=xmin, xmax=xmax, **kwargs)
26132600

26142601

@@ -2646,9 +2633,7 @@ def axline(
26462633

26472634
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26482635
@_copy_docstring_and_deprecators(Axes.axvline)
2649-
def axvline(
2650-
x: float = 0, ymin: float = 0, ymax: float = 1, **kwargs
2651-
) -> Line2D:
2636+
def axvline(x: float = 0, ymin: float = 0, ymax: float = 1, **kwargs) -> Line2D:
26522637
return gca().axvline(x=x, ymin=ymin, ymax=ymax, **kwargs)
26532638

26542639

@@ -2686,9 +2671,7 @@ def bar(
26862671
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26872672
@_copy_docstring_and_deprecators(Axes.barbs)
26882673
def barbs(*args, data=None, **kwargs) -> Barbs:
2689-
return gca().barbs(
2690-
*args, **({"data": data} if data is not None else {}), **kwargs
2691-
)
2674+
return gca().barbs(*args, **({"data": data} if data is not None else {}), **kwargs)
26922675

26932676

26942677
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -2810,18 +2793,13 @@ def broken_barh(
28102793
**kwargs,
28112794
) -> BrokenBarHCollection:
28122795
return gca().broken_barh(
2813-
xranges,
2814-
yrange,
2815-
**({"data": data} if data is not None else {}),
2816-
**kwargs,
2796+
xranges, yrange, **({"data": data} if data is not None else {}), **kwargs
28172797
)
28182798

28192799

28202800
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
28212801
@_copy_docstring_and_deprecators(Axes.clabel)
2822-
def clabel(
2823-
CS: ContourSet, levels: ArrayLike | None = None, **kwargs
2824-
) -> list[Text]:
2802+
def clabel(CS: ContourSet, levels: ArrayLike | None = None, **kwargs) -> list[Text]:
28252803
return gca().clabel(CS, levels=levels, **kwargs)
28262804

28272805

@@ -2997,9 +2975,7 @@ def eventplot(
29972975
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
29982976
@_copy_docstring_and_deprecators(Axes.fill)
29992977
def fill(*args, data: Any | None = None, **kwargs) -> list[Polygon]:
3000-
return gca().fill(
3001-
*args, **({"data": data} if data is not None else {}), **kwargs
3002-
)
2978+
return gca().fill(*args, **({"data": data} if data is not None else {}), **kwargs)
30032979

30042980

30052981
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
@@ -3189,11 +3165,7 @@ def stairs(
31893165
def hist2d(
31903166
x: ArrayLike,
31913167
y: ArrayLike,
3192-
bins: None
3193-
| int
3194-
| tuple[int, int]
3195-
| ArrayLike
3196-
| tuple[ArrayLike, ArrayLike] = 10,
3168+
bins: None | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike] = 10,
31973169
range: ArrayLike | None = None,
31983170
density: bool = False,
31993171
weights: ArrayLike | None = None,
@@ -3298,9 +3270,7 @@ def legend(*args, **kwargs) -> Legend:
32983270
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
32993271
@_copy_docstring_and_deprecators(Axes.locator_params)
33003272
def locator_params(
3301-
axis: Literal["both", "x", "y"] = "both",
3302-
tight: bool | None = None,
3303-
**kwargs,
3273+
axis: Literal["both", "x", "y"] = "both", tight: bool | None = None, **kwargs
33043274
) -> None:
33053275
return gca().locator_params(axis=axis, tight=tight, **kwargs)
33063276

@@ -3604,10 +3574,7 @@ def scatter(
36043574
alpha: float | None = None,
36053575
linewidths: float | Sequence[float] | None = None,
36063576
*,
3607-
edgecolors: Literal["face", "none"]
3608-
| Color
3609-
| Sequence[Color]
3610-
| None = None,
3577+
edgecolors: Literal["face", "none"] | Color | Sequence[Color] | None = None,
36113578
plotnonfinite: bool = False,
36123579
data=None,
36133580
**kwargs,
@@ -3662,8 +3629,7 @@ def specgram(
36623629
pad_to: int | None = None,
36633630
sides: Literal["default", "onesided", "twosided"] | None = None,
36643631
scale_by_freq: bool | None = None,
3665-
mode: Literal["default", "psd", "magnitude", "angle", "phase"]
3666-
| None = None,
3632+
mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = None,
36673633
scale: Literal["default", "linear", "dB"] | None = None,
36683634
vmin: float | None = None,
36693635
vmax: float | None = None,
@@ -3722,9 +3688,7 @@ def spy(
37223688

37233689
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
37243690
@_copy_docstring_and_deprecators(Axes.stackplot)
3725-
def stackplot(
3726-
x, *args, labels=(), colors=None, baseline="zero", data=None, **kwargs
3727-
):
3691+
def stackplot(x, *args, labels=(), colors=None, baseline="zero", data=None, **kwargs):
37283692
return gca().stackplot(
37293693
x,
37303694
*args,
@@ -3870,11 +3834,7 @@ def table(
38703834
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
38713835
@_copy_docstring_and_deprecators(Axes.text)
38723836
def text(
3873-
x: float,
3874-
y: float,
3875-
s: str,
3876-
fontdict: dict[str, Any] | None = None,
3877-
**kwargs,
3837+
x: float, y: float, s: str, fontdict: dict[str, Any] | None = None, **kwargs
38783838
) -> Text:
38793839
return gca().text(x, y, s, fontdict=fontdict, **kwargs)
38803840

@@ -4059,9 +4019,7 @@ def title(
40594019
y: float | None = None,
40604020
**kwargs,
40614021
) -> Text:
4062-
return gca().set_title(
4063-
label, fontdict=fontdict, loc=loc, pad=pad, y=y, **kwargs
4064-
)
4022+
return gca().set_title(label, fontdict=fontdict, loc=loc, pad=pad, y=y, **kwargs)
40654023

40664024

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

tools/boilerplate.py

Lines changed: 1 addition & 1 de 57AE letion
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)
0