Skip to content

Commit 7bbf501

Browse files
authored
TYP: Use Sequence instead of tuple for parameters expecting a sequence (#4198)
1 parent 3921c0d commit 7bbf501

23 files changed

+24
-23
lines changed

pygmt/src/basemap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def basemap(
2929
region: Sequence[float | str] | str | None = None,
3030
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3131
| bool = False,
32-
panel: int | tuple[int, int] | bool = False,
32+
panel: int | Sequence[int] | bool = False,
3333
transparency: float | None = None,
3434
**kwargs,
3535
):

pygmt/src/coast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def coast(
4545
region: Sequence[float | str] | str | None = None,
4646
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4747
| bool = False,
48-
panel: int | tuple[int, int] | bool = False,
48+
panel: int | Sequence[int] | bool = False,
4949
transparency: float | None = None,
5050
**kwargs,
5151
):

pygmt/src/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def colorbar(
3434
region: Sequence[float | str] | str | None = None,
3535
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3636
| bool = False,
37-
panel: int | tuple[int, int] | bool = False,
37+
panel: int | Sequence[int] | bool = False,
3838
transparency: float | None = None,
3939
**kwargs,
4040
):

pygmt/src/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def contour( # noqa: PLR0913
4747
region: Sequence[float | str] | str | None = None,
4848
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4949
| bool = False,
50-
panel: int | tuple[int, int] | bool = False,
50+
panel: int | Sequence[int] | bool = False,
5151
transparency: float | None = None,
5252
**kwargs,
5353
):

pygmt/src/grd2cpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@kwargs_to_strings(L="sequence", T="sequence")
3333
def grd2cpt(
3434
grid: PathLike | xr.DataArray,
35-
truncate: tuple[float, float] | None = None,
35+
truncate: Sequence[float] | None = None,
3636
overrule_bg: bool = False,
3737
no_bg: bool = False,
3838
log: bool = False,

pygmt/src/grdcontour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def grdcontour(
4444
region: Sequence[float | str] | str | None = None,
4545
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4646
| bool = False,
47-
panel: int | tuple[int, int] | bool = False,
47+
panel: int | Sequence[int] | bool = False,
4848
transparency: float | None = None,
4949
**kwargs,
5050
):

pygmt/src/grdimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def grdimage(
3737
region: Sequence[float | str] | str | None = None,
3838
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3939
| bool = False,
40-
panel: int | tuple[int, int] | bool = False,
40+
panel: int | Sequence[int] | bool = False,
4141
transparency: float | None = None,
4242
cores: int | bool = False,
4343
**kwargs,

pygmt/src/grdview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def grdview(
3939
region: Sequence[float | str] | str | None = None,
4040
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4141
| bool = False,
42-
panel: int | tuple[int, int] | bool = False,
42+
panel: int | Sequence[int] | bool = False,
4343
transparency: float | None = None,
4444
**kwargs,
4545
):

pygmt/src/histogram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def histogram(
4444
region: Sequence[float | str] | str | None = None,
4545
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
4646
| bool = False,
47-
panel: int | tuple[int, int] | bool = False,
47+
panel: int | Sequence[int] | bool = False,
4848
transparency: float | None = None,
4949
**kwargs,
5050
):

pygmt/src/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def image(
2424
monochrome: bool = False,
2525
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
2626
| bool = False,
27-
panel: int | tuple[int, int] | bool = False,
27+
panel: int | Sequence[int] | bool = False,
2828
transparency: float | None = None,
2929
**kwargs,
3030
):

0 commit comments

Comments
 (0)