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

Appearance settings

Commit 61085e1

Browse filesBrowse files
authored
Merge pull request #10313 from timhoffm/inline-accepts
Make commented ACCEPTS statements inline comments
2 parents 4872b79 + 49b5097 commit 61085e1
Copy full SHA for 61085e1

File tree

Expand file treeCollapse file tree

10 files changed

+62
-124
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+62
-124
lines changed

‎lib/matplotlib/artist.py

Copy file name to clipboardExpand all lines: lib/matplotlib/artist.py
+18-36Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ def set_transform(self, t):
307307
Parameters
308308
----------
309309
t : `~.Transform`
310-
..
311-
ACCEPTS: `~.Transform`
310+
.. ACCEPTS: `~.Transform`
312311
"""
313312
self._transform = t
314313
self._transformSet = True
@@ -380,8 +379,7 @@ def set_contains(self, picker):
380379
Parameters
381380
----------
382381
picker : callable
383-
..
384-
ACCEPTS: a callable function
382+
.. ACCEPTS: a callable function
385383
"""
386384
self._contains = picker
387385

@@ -461,8 +459,7 @@ def set_picker(self, picker):
461459
Parameters
462460
----------
463461
picker : None or bool or float or callable
464-
..
465-
ACCEPTS: [None | bool | float | callable]
462+
.. ACCEPTS: [None | bool | float | callable]
466463
"""
467464
self._picker = picker
468465

@@ -486,8 +483,7 @@ def set_url(self, url):
486483
Parameters
487484
----------
488485
url : str
489-
..
490-
ACCEPTS: a url string
486+
.. ACCEPTS: a url string
491487
"""
492488
self._url = url
493489

@@ -502,8 +498,7 @@ def set_gid(self, gid):
502498
Parameters
503499
----------
504500
gid : str
505-
..
506-
ACCEPTS: an id string
501+
.. ACCEPTS: an id string
507502
"""
508503
self._gid = gid
509504

@@ -541,8 +536,7 @@ def set_snap(self, snap):
541536
Parameters
542537
----------
543538
snap : bool or None
544-
..
545-
ACCEPTS: bool or None
539+
.. ACCEPTS: bool or None
546540
"""
547541
self._snap = snap
548542
self.stale = True
@@ -589,8 +583,7 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
589583
The scale factor by which the length is shrunken or
590584
expanded (default 16.0)
591585
592-
..
593-
ACCEPTS: (scale: float, length: float, randomness: float)
586+
.. ACCEPTS: (scale: float, length: float, randomness: float)
594587
"""
595588
if scale is None:
596589
self._sketch = None
@@ -604,8 +597,7 @@ def set_path_effects(self, path_effects):
604597
Parameters
605598
----------
606599
path_effects : `~.AbstractPathEffect`
607-
..
608-
ACCEPTS: `~.AbstractPathEffect`
600+
.. ACCEPTS: `~.AbstractPathEffect`
609601
"""
610602
self._path_effects = path_effects
611603
self.stale = True
@@ -624,8 +616,7 @@ def set_figure(self, fig):
624616
Parameters
625617
----------
626618
fig : `~.Figure`
627-
..
628-
ACCEPTS: a `~.Figure` instance
619+
.. ACCEPTS: a `~.Figure` instance
629620
"""
630621
# if this is a no-op just return
631622
if self.figure is fig:
@@ -650,8 +641,7 @@ def set_clip_box(self, clipbox):
650641
Parameters
651642
----------
652643
clipbox : `~.Bbox`
653-
..
654-
ACCEPTS: a `~.Bbox` instance
644+
.. ACCEPTS: a `~.Bbox` instance
655645
"""
656646
self.clipbox = clipbox
657647
self.pchanged()
@@ -758,8 +748,7 @@ def set_clip_on(self, b):
758748
Parameters
759749
----------
760750
b : bool
761-
..
762-
ACCEPTS: bool
751+
.. ACCEPTS: bool
763752
"""
764753
self._clipon = b
765754
# This may result in the callbacks being hit twice, but ensures they
@@ -790,8 +779,7 @@ def set_rasterized(self, rasterized):
790779
Parameters
791780
----------
792781
rasterized : bool or None
793-
..
794-
ACCEPTS: bool or None
782+
.. ACCEPTS: bool or None
795783
"""
796784
if rasterized and not hasattr(self.draw, "_supports_rasterization"):
797785
warnings.warn("Rasterization of '%s' will be ignored" % self)
@@ -811,8 +799,7 @@ def set_agg_filter(self, filter_func):
811799
A filter function, which takes a (m, n, 3) float array and a dpi
812800
value, and returns a (m, n, 3) array.
813801
814-
..
815-
ACCEPTS: a filter function, which takes a (m, n, 3) float array
802+
.. ACCEPTS: a filter function, which takes a (m, n, 3) float array
816803
and a dpi value, and returns a (m, n, 3) array
817804
"""
818805
self._agg_filter = filter_func
@@ -832,8 +819,7 @@ def set_alpha(self, alpha):
832819
Parameters
833820
----------
834821
alpha : float
835-
..
836-
ACCEPTS: float (0.0 transparent through 1.0 opaque)
822+
.. ACCEPTS: float (0.0 transparent through 1.0 opaque)
837823
"""
838824
self._alpha = alpha
839825
self.pchanged()
@@ -846,8 +832,7 @@ def set_visible(self, b):
846832
Parameters
847833
----------
848834
b : bool
849-
..
850-
ACCEPTS: bool
835+
.. ACCEPTS: bool
851836
"""
852837
self._visible = b
853838
self.pchanged()
@@ -860,8 +845,7 @@ def set_animated(self, b):
860845
Parameters
861846
----------
862847
b : bool
863-
..
864-
ACCEPTS: bool
848+
.. ACCEPTS: bool
865849
"""
866850
if self._animated != b:
867851
self._animated = b
@@ -924,8 +908,7 @@ def set_label(self, s):
924908
*s* will be converted to a string by calling `str` (`unicode` on
925909
Py2).
926910
927-
..
928-
ACCEPTS: object
911+
.. ACCEPTS: object
929912
"""
930913
if s is not None:
931914
self._label = six.text_type(s)
@@ -946,8 +929,7 @@ def set_zorder(self, level):
946929
Parameters
947930
----------
948931
level : float
949-
..
950-
ACCEPTS: float
932+
.. ACCEPTS: float
951933
"""
952934
if level is None:
953935
level = self.__class__.zorder

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.