Skip to content

Commit cf1801b

Browse files
authored
TYP: Add type hints for the 'projection' parameter (#4123)
1 parent bd1dd63 commit cf1801b

27 files changed

+29
-29
lines changed

pygmt/helpers/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
the viewpoint [Default is ``[180, 90]``]. Full documentation is at
270270
:gmt-docs:`gmt.html#perspective-full`.""",
271271
"projection": r"""
272-
projection : str
272+
projection
273273
*projcode*\[*projparams*/]\ *width*\|\ *scale*.
274274
Select map :doc:`projection </projections/index>`.""",
275275
"region": r"""
@@ -415,7 +415,7 @@ def fmt_docstring(module_func):
415415
region : str or list
416416
*xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
417417
Specify the :doc:`region </tutorials/basics/regions>` of interest.
418-
projection : str
418+
projection
419419
*projcode*\[*projparams*/]\ *width*\|\ *scale*.
420420
Select map :doc:`projection </projections/index>`.
421421
<BLANKLINE>

pygmt/src/basemap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@kwargs_to_strings(R="sequence", p="sequence")
2626
def basemap(
2727
self,
28-
projection=None,
28+
projection: str | None = None,
2929
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3030
| bool = False,
3131
panel: int | tuple[int, int] | bool = False,

pygmt/src/coast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@kwargs_to_strings(R="sequence", p="sequence")
3838
def coast(
3939
self,
40-
projection=None,
40+
projection: str | None = None,
4141
resolution: Literal[
4242
"auto", "full", "high", "intermediate", "low", "crude", None
4343
] = None,

pygmt/src/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@kwargs_to_strings(R="sequence", G="sequence", I="sequence", p="sequence")
3030
def colorbar(
3131
self,
32-
projection=None,
32+
projection: str | None = None,
3333
box: Box | bool = False,
3434
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3535
| bool = False,

pygmt/src/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def contour(
4343
y=None,
4444
z=None,
4545
no_clip: bool = False,
46-
projection=None,
46+
projection: str | None = None,
4747
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4848
| bool = False,
4949
panel: int | tuple[int, int] | bool = False,

pygmt/src/grdcontour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
def grdcontour(
4141
self,
4242
grid: PathLike | xr.DataArray,
43-
projection=None,
43+
projection: str | None = None,
4444
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4545
| bool = False,
4646
panel: int | tuple[int, int] | bool = False,

pygmt/src/grdcut.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def grdcut(
3333
grid: PathLike | xr.DataArray,
3434
kind: Literal["grid", "image"] = "grid",
3535
outgrid: PathLike | None = None,
36-
projection=None,
36+
projection: str | None = None,
3737
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3838
| bool = False,
3939
**kwargs,

pygmt/src/grdimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def grdimage(
3333
grid: PathLike | xr.DataArray,
3434
monochrome: bool = False,
3535
no_clip: bool = False,
36-
projection=None,
36+
projection: str | None = None,
3737
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3838
| bool = False,
3939
panel: int | tuple[int, int] | bool = False,

pygmt/src/grdproject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
def grdproject(
3131
grid: PathLike | xr.DataArray,
3232
outgrid: PathLike | None = None,
33-
projection=None,
33+
projection: str | None = None,
3434
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3535
| bool = False,
3636
**kwargs,

pygmt/src/grdview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
def grdview(
3636
self,
3737
grid: PathLike | xr.DataArray,
38-
projection=None,
38+
projection: str | None = None,
3939
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4040
| bool = False,
4141
panel: int | tuple[int, int] | bool = False,

0 commit comments

Comments
 (0)