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

Commit7d7e141

Browse files
committed
Workaround to prevent "reference target not found" errors in doc builds
This introduces a known blacklist of currently non-linkable items.
1 parent51c38d4 commit7d7e141

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

‎doc/api/axis_api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ XAxis Specific
181181
XAxis.get_text_heights
182182
XAxis.get_ticks_position
183183
XAxis.set_ticks_position
184+
XAxis.set_label_position
184185
XAxis.tick_bottom
185186
XAxis.tick_top
186187

@@ -197,6 +198,7 @@ YAxis Specific
197198
YAxis.get_ticks_position
198199
YAxis.set_offset_position
199200
YAxis.set_ticks_position
201+
YAxis.set_label_position
200202
YAxis.tick_left
201203
YAxis.tick_right
202204

@@ -264,4 +266,5 @@ specify a matching series of labels. Calling ``set_ticks`` makes a
264266
Tick.set_label1
265267
Tick.set_label2
266268
Tick.set_pad
269+
Tick.set_url
267270
Tick.update_position

‎lib/matplotlib/artist.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,21 @@ def aliased_name(self, s):
14391439
aliases=''.join(' or %s'%xforxinsorted(self.aliasd.get(s, [])))
14401440
returns+aliases
14411441

1442+
_NOT_LINKABLE= {
1443+
# A set of property setter methods that are not available in our
1444+
# current docs. This is a workaround used to prevent trying to link
1445+
# these setters which would lead to "target reference not found"
1446+
# warnings during doc build.
1447+
'matplotlib.image._ImageBase.set_alpha',
1448+
'matplotlib.image._ImageBase.set_array',
1449+
'matplotlib.image._ImageBase.set_data',
1450+
'matplotlib.image._ImageBase.set_filternorm',
1451+
'matplotlib.image._ImageBase.set_filterrad',
1452+
'matplotlib.image._ImageBase.set_interpolation',
1453+
'matplotlib.image._ImageBase.set_resample',
1454+
'matplotlib.text._AnnotationBase.set_annotation_clip',
1455+
}
1456+
14421457
defaliased_name_rest(self,s,target):
14431458
"""
14441459
Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME',
@@ -1448,6 +1463,10 @@ def aliased_name_rest(self, s, target):
14481463
alias, return 'markerfacecolor or mfc' and for the transform
14491464
property, which does not, return 'transform'.
14501465
"""
1466+
# workaround to prevent "reference target not found"
1467+
iftargetinself._NOT_LINKABLE:
1468+
returnf'``{s}``'
1469+
14511470
aliases=''.join(' or %s'%xforxinsorted(self.aliasd.get(s, [])))
14521471
return':meth:`%s <%s>`%s'% (s,target,aliases)
14531472

@@ -1708,7 +1727,7 @@ def kwdoc(artist):
17081727
"""
17091728
ai=ArtistInspector(artist)
17101729
return ('\n'.join(ai.pprint_setters_rest(leadingspace=4))
1711-
ifmpl.rcParams['docstring.hardcopy']else
1730+
ifmpl.rcParams['docstring.hardcopy']orTrueelse
17121731
'Properties:\n'+'\n'.join(ai.pprint_setters(leadingspace=4)))
17131732

17141733
# We defer this to the end of them module, because it needs ArtistInspector

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp