From f96a463224290e93d05580a971027936e0019e08 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sun, 12 Sep 2021 14:02:17 +0200 Subject: [PATCH] Fix validate_markevery docstring markup. Make type lists fit in a single line. A strict reading suggests that all types should be separated with ` or ` rather than a comma, but avoiding a backslash continuation seems more useful. Also, *s* can also be a str. --- lib/matplotlib/rcsetup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index 9f6b9d53ca62..e582f5cb575a 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -485,14 +485,11 @@ def validate_markevery(s): Parameters ---------- - s : None, int, float, slice, length-2 tuple of ints, - length-2 tuple of floats, list of ints + s : None, int, (int, int), slice, float, (float, float), or list[int] Returns ------- - None, int, float, slice, length-2 tuple of ints, - length-2 tuple of floats, list of ints - + None, int, (int, int), slice, float, (float, float), or list[int] """ # Validate s against type slice float int and None if isinstance(s, (slice, float, int, type(None))):