Skip to content

Commit da36673

Browse files
authored
Rewrap docstrings to 88 characters (#2926)
1 parent 29f87b7 commit da36673

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+335
-405
lines changed

pygmt/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
22
PyGMT is a library for processing geospatial and geophysical data and making
3-
publication-quality maps and figures. It provides a Pythonic interface for the
4-
Generic Mapping Tools (GMT), a command-line program widely used across the
5-
Earth, Ocean, and Planetary sciences and beyond. Besides making GMT more
6-
accessible to new users, PyGMT aims to provide integration with the PyData
7-
ecosystem as well as support for rich display in Jupyter notebooks.
3+
publication-quality maps and figures. It provides a Pythonic interface for the Generic
4+
Mapping Tools (GMT), a command-line program widely used across the Earth, Ocean, and
5+
Planetary sciences and beyond. Besides making GMT more accessible to new users, PyGMT
6+
aims to provide integration with the PyData ecosystem as well as support for rich
7+
display in Jupyter notebooks.
88
99
Main Features
1010
-------------
@@ -93,8 +93,7 @@ def print_clib_info(file=sys.stdout):
9393

9494
def show_versions(file=sys.stdout):
9595
"""
96-
Print various dependency versions which are useful when submitting bug
97-
reports.
96+
Print various dependency versions which are useful when submitting bug reports.
9897
9998
This includes information about:
10099

pygmt/accessors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def registration(self, value):
150150
@property
151151
def gtype(self):
152152
"""
153-
Coordinate system type of the grid, either 0 (Cartesian) or 1
154-
(Geographic).
153+
Coordinate system type of the grid, either 0 (Cartesian) or 1 (Geographic).
155154
"""
156155
return self._gtype
157156

pygmt/clib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Low-level wrapper for the GMT C API.
33
4-
The pygmt.clib.Session class wraps the GMT C shared library (libgmt) with a
5-
Pythonic interface. Access to the C library is done through ctypes.
4+
The pygmt.clib.Session class wraps the GMT C shared library (libgmt) with a Pythonic
5+
interface. Access to the C library is done through ctypes.
66
"""
77

88
from pygmt.clib.session import Session

pygmt/clib/conversion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ def dataarray_to_matrix(grid):
126126

127127
def vectors_to_arrays(vectors):
128128
"""
129-
Convert 1-D vectors (lists, arrays, or pandas.Series) to C contiguous 1-D
130-
arrays.
129+
Convert 1-D vectors (lists, arrays, or pandas.Series) to C contiguous 1-D arrays.
131130
132131
Arrays must be in C contiguous order for us to pass their memory pointers
133132
to GMT. If any are not, convert them to C order (which requires copying the

pygmt/clib/loading.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
Utility functions to load libgmt as ctypes.CDLL.
33
4-
The path to the shared library can be found automatically by ctypes or set
5-
through the GMT_LIBRARY_PATH environment variable.
4+
The path to the shared library can be found automatically by ctypes or set through the
5+
GMT_LIBRARY_PATH environment variable.
66
"""
77
import ctypes
88
import os

pygmt/clib/session.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Defines the Session class to create and destroy a GMT API session and provides
3-
access to the API functions.
2+
Defines the Session class to create and destroy a GMT API session and provides access to
3+
the API functions.
44
55
Uses ctypes to wrap most of the core functions from the C API.
66
"""
@@ -369,11 +369,11 @@ def create(self, name):
369369
@ctp.CFUNCTYPE(ctp.c_int, ctp.c_void_p, ctp.c_char_p)
370370
def print_func(file_pointer, message): # noqa: ARG001
371371
"""
372-
Callback function that the GMT C API will use to print log and
373-
error messages.
372+
Callback function that the GMT C API will use to print log and error
373+
messages.
374374
375-
We'll capture the messages and print them to stderr so that they
376-
will show up on the Jupyter notebook.
375+
We'll capture the messages and print them to stderr so that they will show
376+
up on the Jupyter notebook.
377377
"""
378378
message = message.decode().strip()
379379
self._error_log.append(message)
@@ -497,8 +497,8 @@ def get_default(self, name):
497497

498498
def get_common(self, option):
499499
"""
500-
Inquire if a GMT common option has been set and return its current
501-
value if possible.
500+
Inquire if a GMT common option has been set and return its current value if
501+
possible.
502502
503503
Parameters
504504
----------
@@ -720,9 +720,9 @@ def _parse_pad(self, family, kwargs):
720720
"""
721721
Parse and return an appropriate value for pad if none is given.
722722
723-
Pad is a bit tricky because, for matrix types, pad control the matrix
724-
ordering (row or column major). Using the default pad will set it to
725-
column major and mess things up with the numpy arrays.
723+
Pad is a bit tricky because, for matrix types, pad control the matrix ordering
724+
(row or column major). Using the default pad will set it to column major and
725+
mess things up with the numpy arrays.
726726
"""
727727
pad = kwargs.get("pad", None)
728728
if pad is None:
@@ -783,8 +783,8 @@ def _parse_constant(self, constant, valid, valid_modifiers=None):
783783

784784
def _check_dtype_and_dim(self, array, ndim):
785785
"""
786-
Check that a numpy array has the given number of dimensions and is a
787-
valid data type.
786+
Check that a numpy array has the given number of dimensions and is a valid data
787+
type.
788788
789789
Parameters
790790
----------

pygmt/datasets/earth_age.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Function to download the Earth seafloor crustal age dataset from the GMT data
3-
server, and load as :class:`xarray.DataArray`.
2+
Function to download the Earth seafloor crustal age dataset from the GMT data server,
3+
and load as :class:`xarray.DataArray`.
44
55
The grids are available in various resolutions.
66
"""

pygmt/datasets/earth_free_air_anomaly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Function to download the IGPP Earth Free-Air Anomaly dataset from the GMT data
3-
server, and load as :class:`xarray.DataArray`.
2+
Function to download the IGPP Earth Free-Air Anomaly dataset from the GMT data server,
3+
and load as :class:`xarray.DataArray`.
44
55
The grids are available in various resolutions.
66
"""

pygmt/datasets/earth_geoid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Function to download the EGM2008 Earth Geoid dataset from the GMT data server,
3-
and load as :class:`xarray.DataArray`.
2+
Function to download the EGM2008 Earth Geoid dataset from the GMT data server, and load
3+
as :class:`xarray.DataArray`.
44
55
The grids are available in various resolutions.
66
"""

pygmt/datasets/earth_magnetic_anomaly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Function to download the Earth magnetic anomaly datasets from the GMT data
3-
server, and load as :class:`xarray.DataArray`.
2+
Function to download the Earth magnetic anomaly datasets from the GMT data server, and
3+
load as :class:`xarray.DataArray`.
44
55
The grids are available in various resolutions.
66
"""

0 commit comments

Comments
 (0)