Skip to content

Commit

Permalink
Try removing all noqa: W505
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Oct 15, 2023
1 parent 03e0357 commit a208ca8
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
The projection is set with **u** or **U**. *zone* sets the zone for the figure,
and the figure size is set with *scale* or *width*.
""" # noqa: W505
"""

# %%
import pygmt
Expand Down
5 changes: 2 additions & 3 deletions pygmt/datasets/earth_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ def load_earth_age(resolution="01d", region=None, registration=None):
:class:`xarray.DataArray` grid can be accessed via the GMT accessors
(i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively).
However, these properties may be lost after specific grid operations (such
as slicing) and will need to be manually set before passing the grid to any
PyGMT data processing or plotting functions. Refer to
as slicing) and will need to be manually set before passing the grid to any PyGMT data processing or plotting functions. Refer to
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and
workarounds.
Expand All @@ -91,7 +90,7 @@ def load_earth_age(resolution="01d", region=None, registration=None):
... region=[120, 160, 30, 60],
... registration="gridline",
... )
""" # noqa: W505
"""
grid = _load_remote_dataset(
dataset_name="earth_age",
dataset_prefix="earth_age_",
Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_free_air_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None
... region=[120, 160, 30, 60],
... registration="gridline",
... )
""" # noqa: W505
"""
grid = _load_remote_dataset(
dataset_name="earth_free_air_anomaly",
dataset_prefix="earth_faa_",
Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_geoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def load_earth_geoid(resolution="01d", region=None, registration=None):
... region=[120, 160, 30, 60],
... registration="gridline",
... )
""" # noqa: W505
"""
grid = _load_remote_dataset(
dataset_name="earth_geoid",
dataset_prefix="earth_geoid_",
Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_magnetic_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def load_earth_magnetic_anomaly(
>>> grid = load_earth_magnetic_anomaly(
... resolution="20m", registration="gridline", data_source="wdmam"
... )
""" # noqa: W505
"""
magnetic_anomaly_sources = {
"emag2": "earth_mag_",
"emag2_4km": "earth_mag4km_",
Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def load_earth_mask(resolution="01d", region=None, registration=None):
>>> # location (170°E, 50°N) is in oceanic area (0)
>>> grid.sel(lon=170, lat=50).values
array(0, dtype=int8)
""" # noqa: W505
"""
grid = _load_remote_dataset(
dataset_name="earth_mask",
dataset_prefix="earth_mask_",
Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_relief.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def load_earth_relief(
... registration="gridline",
... use_srtm=True,
... )
""" # noqa: W505
"""
# resolutions of original land-only SRTM tiles from NASA
land_only_srtm_resolutions = ["03s", "01s"]

Expand Down
2 changes: 1 addition & 1 deletion pygmt/datasets/earth_vertical_gravity_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def load_earth_vertical_gravity_gradient(
... region=[120, 160, 30, 60],
... registration="gridline",
... )
""" # noqa: W505
"""
grid = _load_remote_dataset(
dataset_name="earth_vgg",
dataset_prefix="earth_vgg_",
Expand Down
4 changes: 2 additions & 2 deletions pygmt/datasets/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def load_sample_data(name):
>>> from pprint import pprint
>>> from pygmt.datasets import list_sample_data, load_sample_data
>>> # use list_sample_data to see the available datasets
>>> pprint(list_sample_data(), width=120) # noqa: W505
>>> pprint(list_sample_data(), width=120)
{'bathymetry': 'Table of ship bathymetric observations off Baja California',
'earth_relief_holes': 'Regional 20 arc-minutes Earth relief grid with holes',
'fractures': 'Table of hypothetical fracture lengths and azimuths',
Expand All @@ -344,7 +344,7 @@ def load_sample_data(name):
'usgs_quakes': 'Table of earthquakes from the USGS'}
>>> # load the sample bathymetry dataset
>>> data = load_sample_data("bathymetry")
""" # noqa: W505
"""
if name not in datasets:
raise GMTInvalidInput(f"Invalid dataset name '{name}'.")
return datasets[name].func()
2 changes: 1 addition & 1 deletion pygmt/src/nearneighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def nearneighbor(data=None, x=None, y=None, z=None, **kwargs):
... region=[245, 255, 20, 30],
... search_radius="10m",
... )
""" # noqa: W505
"""
with GMTTempFile(suffix=".nc") as tmpfile:
with Session() as lib:
table_context = lib.virtualfile_from_data(
Expand Down

0 comments on commit a208ca8

Please sign in to comment.