Skip to content

Commit bb6e084

Browse files
DOC: Make indent for bullet point lists consistent (#4114)
1 parent 4a0fe79 commit bb6e084

File tree

1 file changed

+72
-87
lines changed

1 file changed

+72
-87
lines changed

pygmt/helpers/decorators.py

Lines changed: 72 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
Decorators to help wrap the GMT modules.
33
44
Apply them to functions wrapping GMT modules to automate: alias generation for
5-
arguments, insert common text into docstrings, transform arguments to strings,
6-
etc.
5+
arguments, insert common text into docstrings, transform arguments to strings, etc.
76
"""
87

98
import functools
@@ -22,40 +21,38 @@
2221
[**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*].
2322
Features with an area smaller than *min_area* in km\ :sup:`2` or of
2423
hierarchical level that is lower than *min_level* or higher than
25-
*max_level* will not be plotted [Default is ``"0/0/4"`` (all
26-
features)].""",
24+
*max_level* will not be plotted [Default is ``"0/0/4"`` (all features)].""",
2725
"aspatial": r"""
2826
aspatial : bool or str
2927
[*col*\ =]\ *name*\ [,...].
3028
Control how aspatial data are handled during input and output.
31-
Full documentation is at :gmt-docs:`gmt.html#aspatial-full`.
32-
""",
29+
Full documentation is at :gmt-docs:`gmt.html#aspatial-full`.""",
3330
"binary": r"""
3431
binary : bool or str
3532
**i**\|\ **o**\ [*ncols*][*type*][**w**][**+l**\|\ **b**].
3633
Select native binary input (using ``binary="i"``) or output
3734
(using ``binary="o"``), where *ncols* is the number of data columns
3835
of *type*, which must be one of:
3936
40-
- **c**: int8_t (1-byte signed char)
41-
- **u**: uint8_t (1-byte unsigned char)
42-
- **h**: int16_t (2-byte signed int)
43-
- **H**: uint16_t (2-byte unsigned int)
44-
- **i**: int32_t (4-byte signed int)
45-
- **I**: uint32_t (4-byte unsigned int)
46-
- **l**: int64_t (8-byte signed int)
47-
- **L**: uint64_t (8-byte unsigned int)
48-
- **f**: 4-byte single-precision float
49-
- **d**: 8-byte double-precision float
50-
- **x**: use to skip *ncols* anywhere in the record
37+
- **c**: int8_t (1-byte signed char)
38+
- **u**: uint8_t (1-byte unsigned char)
39+
- **h**: int16_t (2-byte signed int)
40+
- **H**: uint16_t (2-byte unsigned int)
41+
- **i**: int32_t (4-byte signed int)
42+
- **I**: uint32_t (4-byte unsigned int)
43+
- **l**: int64_t (8-byte signed int)
44+
- **L**: uint64_t (8-byte unsigned int)
45+
- **f**: 4-byte single-precision float
46+
- **d**: 8-byte double-precision float
47+
- **x**: use to skip *ncols* anywhere in the record
5148
5249
For records with mixed types, append additional comma-separated
5350
combinations of *ncols* *type* (no space). The following modifiers
5451
are supported:
5552
56-
- **w** after any item to force byte-swapping.
57-
- **+l**\|\ **b** to indicate that the entire data file should
58-
be read as little- or big-endian, respectively.
53+
- **w** after any item to force byte-swapping.
54+
- **+l**\|\ **b** to indicate that the entire data file should be
55+
read as little- or big-endian, respectively.
5956
6057
Full documentation is at :gmt-docs:`gmt.html#bi-full`.""",
6158
"cmap": r"""
@@ -66,9 +63,8 @@
6663
"coltypes": r"""
6764
coltypes : str
6865
[**i**\|\ **o**]\ *colinfo*.
69-
Specify data types of input and/or output columns (time or
70-
geographical data). Full documentation is at
71-
:gmt-docs:`gmt.html#f-full`.""",
66+
Specify data types of input and/or output columns (time or geographical
67+
data). Full documentation is at :gmt-docs:`gmt.html#f-full`.""",
7268
"cores": r"""
7369
cores : bool or int
7470
Specify the number of active cores to be used in any OpenMP-enabled
@@ -95,7 +91,7 @@
9591
"frame": r"""
9692
frame : bool, str, or list
9793
Set map boundary
98-
:doc:`frame and axes attributes </tutorials/basics/frames>`. """,
94+
:doc:`frame and axes attributes </tutorials/basics/frames>`.""",
9995
"gap": r"""
10096
gap : str or list
10197
**x**\|\ **y**\|\ **z**\|\ **d**\|\ **X**\|\ **Y**\|\
@@ -105,38 +101,34 @@
105101
a list with each item containing a string describing one set of
106102
criteria.
107103
108-
- **x**\|\ **X**: define a gap when there is a large enough
109-
change in the x coordinates (uppercase to use projected
110-
coordinates).
111-
- **y**\|\ **Y**: define a gap when there is a large enough
112-
change in the y coordinates (uppercase to use projected
113-
coordinates).
114-
- **d**\|\ **D**: define a gap when there is a large enough
115-
distance between coordinates (uppercase to use projected
116-
coordinates).
117-
- **z**: define a gap when there is a large enough change in
118-
the z data. Use **+c**\ *col* to change the z data column
119-
[Default *col* is 2 (i.e., 3rd column)].
104+
- **x**\|\ **X**: define a gap when there is a large enough
105+
change in the x coordinates (uppercase to use projected coordinates).
106+
- **y**\|\ **Y**: define a gap when there is a large enough
107+
change in the y coordinates (uppercase to use projected coordinates).
108+
- **d**\|\ **D**: define a gap when there is a large enough
109+
distance between coordinates (uppercase to use projected coordinates).
110+
- **z**: define a gap when there is a large enough change in
111+
the z data. Use **+c**\ *col* to change the z data column
112+
[Default *col* is 2 (i.e., 3rd column)].
120113
121114
A unit **u** may be appended to the specified *gap*:
122115
123-
- For geographic data (**x**\|\ **y**\|\ **d**), the unit may
124-
be arc- **d**\ (egrees), **m**\ (inutes), and **s**\ (econds)
125-
, or (m)\ **e**\ (ters), **f**\ (eet), **k**\ (ilometers),
126-
**M**\ (iles), or **n**\ (autical miles) [Default is
127-
(m)\ **e**\ (ters)].
128-
- For projected data (**X**\|\ **Y**\|\ **D**), the unit may be
129-
**i**\ (nches), **c**\ (entimeters), or **p**\ (oints).
116+
- For geographic data (**x**\|\ **y**\|\ **d**), the unit may
117+
be arc- **d**\ (egrees), **m**\ (inutes), and **s**\ (econds),
118+
or (m)\ **e**\ (ters), **f**\ (eet), **k**\ (ilometers),
119+
**M**\ (iles), or **n**\ (autical miles) [Default is (m)\ **e**\ (ters)].
120+
- For projected data (**X**\|\ **Y**\|\ **D**), the unit may be
121+
**i**\ (nches), **c**\ (entimeters), or **p**\ (oints).
130122
131123
Append modifier **+a** to specify that *all* the criteria must be
132124
met [default imposes breaks if any one criterion is met].
133125
134126
One of the following modifiers can be appended:
135127
136-
- **+n**: specify that the previous value minus the current
137-
column value must exceed *gap* for a break to be imposed.
138-
- **+p**: specify that the current value minus the previous
139-
value must exceed *gap* for a break to be imposed.""",
128+
- **+n**: specify that the previous value minus the current
129+
column value must exceed *gap* for a break to be imposed.
130+
- **+p**: specify that the current value minus the previous
131+
value must exceed *gap* for a break to be imposed.""",
140132
"grid": r"""
141133
grid
142134
Name of the input grid file or the grid loaded as a
@@ -153,17 +145,17 @@
153145
header records. Prepend **o** to control the writing of header
154146
records, with the following modifiers supported:
155147
156-
- **+d** to remove existing header records.
157-
- **+c** to add a header comment with column names to the
158-
output [Default is no column names].
159-
- **+m** to add a segment header *segheader* to the output
160-
after the header block [Default is no segment header].
161-
- **+r** to add a *remark* comment to the output [Default is no
162-
comment]. The *remark* string may contain \\n to indicate
163-
line-breaks.
164-
- **+t** to add a *title* comment to the output [Default is no
165-
title]. The *title* string may contain \\n to indicate
166-
line-breaks.
148+
- **+d** to remove existing header records.
149+
- **+c** to add a header comment with column names to the
150+
output [Default is no column names].
151+
- **+m** to add a segment header *segheader* to the output
152+
after the header block [Default is no segment header].
153+
- **+r** to add a *remark* comment to the output [Default is no
154+
comment]. The *remark* string may contain \\n to indicate
155+
line-breaks.
156+
- **+t** to add a *title* comment to the output [Default is no
157+
title]. The *title* string may contain \\n to indicate
158+
line-breaks.
167159
168160
Blank lines and lines starting with \# are always skipped.""",
169161
"incols": r"""
@@ -189,18 +181,14 @@
189181
following modifiers to any column or column range to transform
190182
the input columns:
191183
192-
- **+l** to take the *log10* of the input values.
193-
- **+d** to divide the input values by the factor *divisor*
194-
[Default is 1].
195-
- **+s** to multiple the input values by the factor *scale*
196-
[Default is 1].
197-
- **+o** to add the given *offset* to the input values [Default
198-
is 0].""",
184+
- **+l** to take the *log10* of the input values.
185+
- **+d** to divide the input values by the factor *divisor* [Default is 1].
186+
- **+s** to multiple the input values by the factor *scale* [Default is 1].
187+
- **+o** to add the given *offset* to the input values [Default is 0].""",
199188
"interpolation": r"""
200189
interpolation : str
201190
[**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *BC*][**+c**][**+t**\ *threshold*].
202-
Select interpolation mode for grids. You can select the type of
203-
spline used:
191+
Select interpolation mode for grids. You can select the type of spline used:
204192
205193
- **b** for B-spline
206194
- **c** for bicubic [Default]
@@ -258,8 +246,7 @@
258246
Name of the output netCDF grid file. If not specified, will return an
259247
:class:`xarray.DataArray` object. For writing a specific grid file format or
260248
applying basic data operations to the output grid, see
261-
:gmt-docs:`gmt.html#grd-inout-full` for the available modifiers.
262-
""",
249+
:gmt-docs:`gmt.html#grd-inout-full` for the available modifiers.""",
263250
"panel": r"""
264251
panel
265252
Select a specific subplot panel. Only allowed when used in
@@ -280,8 +267,7 @@
280267
[**+w**\ *lon0*/*lat0*\[/*z0*]][**+v**\ *x0*/*y0*].
281268
Select perspective view and set the azimuth and elevation angle of
282269
the viewpoint [Default is ``[180, 90]``]. Full documentation is at
283-
:gmt-docs:`gmt.html#perspective-full`.
284-
""",
270+
:gmt-docs:`gmt.html#perspective-full`.""",
285271
"projection": r"""
286272
projection : str
287273
*projcode*\[*projparams*/]\ *width*\|\ *scale*.
@@ -294,8 +280,7 @@
294280
registration : str
295281
**g**\|\ **p**.
296282
Force gridline (**g**) or pixel (**p**) node registration
297-
[Default is **g**\ (ridline)].
298-
""",
283+
[Default is **g**\ (ridline)].""",
299284
"skiprows": r"""
300285
skiprows : bool or str
301286
[*cols*][**+a**][**+r**].
@@ -307,11 +292,11 @@
307292
*inc* defaults to 1 if not specified. The following modifiers are
308293
supported:
309294
310-
- **+r** to reverse the suppression, i.e., only output the
311-
records whose *z*-value equals NaN.
312-
- **+a** to suppress the output of the record if just one or
313-
more of the columns equal NaN [Default skips record only
314-
if values in all specified *cols* equal NaN].""",
295+
- **+r** to reverse the suppression, i.e., only output the
296+
records whose *z*-value equals NaN.
297+
- **+a** to suppress the output of the record if just one or
298+
more of the columns equal NaN [Default skips record only
299+
if values in all specified *cols* equal NaN].""",
315300
"spacing": r"""
316301
spacing : float, str, or list
317302
*x_inc*\ [**+e**\|\ **n**][/\ *y_inc*\ [**+e**\|\ **n**]].
@@ -349,7 +334,7 @@
349334
[Default is ``0``, i.e., opaque].
350335
Only visible when PDF or raster format output is selected.
351336
Only the PNG format selection adds a transparency layer
352-
in the image (for further processing). """,
337+
in the image (for further processing).""",
353338
"verbose": r"""
354339
verbose : bool or str
355340
Select verbosity level [:term:`Full usage <verbose>`].""",
@@ -361,14 +346,14 @@
361346
different column if selected via **+c**\ *col*. The following
362347
cyclical coordinate transformations are supported:
363348
364-
- **y**: yearly cycle (normalized)
365-
- **a**: annual cycle (monthly)
366-
- **w**: weekly cycle (day)
367-
- **d**: daily cycle (hour)
368-
- **h**: hourly cycle (minute)
369-
- **m**: minute cycle (second)
370-
- **s**: second cycle (second)
371-
- **c**: custom cycle (normalized)
349+
- **y**: yearly cycle (normalized)
350+
- **a**: annual cycle (monthly)
351+
- **w**: weekly cycle (day)
352+
- **d**: daily cycle (hour)
353+
- **h**: hourly cycle (minute)
354+
- **m**: minute cycle (second)
355+
- **s**: second cycle (second)
356+
- **c**: custom cycle (normalized)
372357
373358
Full documentation is at :gmt-docs:`gmt.html#w-full`.""",
374359
}

0 commit comments

Comments
 (0)