Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit08877f8

Browse files
authored
Merge pull request#26426 from QuLogic/auto-backport-of-pr-26414-on-v3.7.2-doc
Backport PR#26414: Fixes for pycodestyle v2.11
2 parents7c6b465 +d80c9ce commit08877f8

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

‎examples/misc/packed_bubbles.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def check_collisions(self, bubble, bubbles):
7676

7777
defcollides_with(self,bubble,bubbles):
7878
distance=self.outline_distance(bubble,bubbles)
79-
idx_min=np.argmin(distance)
80-
returnidx_miniftype(idx_min)==np.ndarrayelse [idx_min]
79+
returnnp.argmin(distance,keepdims=True)
8180

8281
defcollapse(self,n_iterations=50):
8382
"""

‎lib/matplotlib/dviread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def __init__(self, scale, tfm, texname, vf):
622622
forcharinrange(nchars)]
623623

624624
def__eq__(self,other):
625-
return (type(self)==type(other)
625+
return (type(self)istype(other)
626626
andself.texname==other.texnameandself.size==other.size)
627627

628628
def__ne__(self,other):

‎lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ def set_fontconfig_pattern(self, pattern):
851851
pattern syntax for use here.
852852
"""
853853
forkey,valinparse_fontconfig_pattern(pattern).items():
854-
iftype(val)==list:
854+
iftype(val)islist:
855855
getattr(self,"set_"+key)(val[0])
856856
else:
857857
getattr(self,"set_"+key)(val)

‎lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,12 +2834,12 @@ def _as_mpl_axes(self):
28342834

28352835
# testing axes creation with plt.axes
28362836
ax=plt.axes([0,0,1,1],projection=prj)
2837-
asserttype(ax)==PolarAxes
2837+
asserttype(ax)isPolarAxes
28382838
plt.close()
28392839

28402840
# testing axes creation with subplot
28412841
ax=plt.subplot(121,projection=prj)
2842-
asserttype(ax)==PolarAxes
2842+
asserttype(ax)isPolarAxes
28432843
plt.close()
28442844

28452845

‎lib/matplotlib/tests/test_cbook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def test_callback_complete(self, pickle):
224224

225225
# test that we can add a callback
226226
cid1=self.connect(self.signal,mini_me.dummy,pickle)
227-
asserttype(cid1)==int
227+
asserttype(cid1)isint
228228
self.is_not_empty()
229229

230230
# test that we don't add a second callback
@@ -249,7 +249,7 @@ def test_callback_disconnect(self, pickle):
249249

250250
# test that we can add a callback
251251
cid1=self.connect(self.signal,mini_me.dummy,pickle)
252-
asserttype(cid1)==int
252+
asserttype(cid1)isint
253253
self.is_not_empty()
254254

255255
self.disconnect(cid1)
@@ -267,7 +267,7 @@ def test_callback_wrong_disconnect(self, pickle):
267267

268268
# test that we can add a callback
269269
cid1=self.connect(self.signal,mini_me.dummy,pickle)
270-
asserttype(cid1)==int
270+
asserttype(cid1)isint
271271
self.is_not_empty()
272272

273273
self.disconnect("foo")

‎lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,6 @@ def test_str_norms(fig_test, fig_ref):
14611461
axrs[3].imshow(t,norm=colors.SymLogNorm(linthresh=2,vmin=.3,vmax=.7))
14621462
axrs[4].imshow(t,norm="logit",clim=(.3,.7))
14631463

1464-
asserttype(axts[0].images[0].norm)==colors.LogNorm# Exactly that class
1464+
asserttype(axts[0].images[0].norm)iscolors.LogNorm# Exactly that class
14651465
withpytest.raises(ValueError):
14661466
axts[0].imshow(t,norm="foobar")

‎lib/matplotlib/tests/test_scale.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ def test_symlog_mask_nan():
3737
x=np.arange(-1.5,5,0.5)
3838
out=slti.transform_non_affine(slt.transform_non_affine(x))
3939
assert_allclose(out,x)
40-
asserttype(out)==type(x)
40+
asserttype(out)istype(x)
4141

4242
x[4]=np.nan
4343
out=slti.transform_non_affine(slt.transform_non_affine(x))
4444
assert_allclose(out,x)
45-
asserttype(out)==type(x)
45+
asserttype(out)istype(x)
4646

4747
x=np.ma.array(x)
4848
out=slti.transform_non_affine(slt.transform_non_affine(x))
4949
assert_allclose(out,x)
50-
asserttype(out)==type(x)
50+
asserttype(out)istype(x)
5151

5252
x[3]=np.ma.masked
5353
out=slti.transform_non_affine(slt.transform_non_affine(x))
5454
assert_allclose(out,x)
55-
asserttype(out)==type(x)
55+
asserttype(out)istype(x)
5656

5757

5858
@image_comparison(['logit_scales.png'],remove_text=True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp