Skip to content

Commit

Permalink
Autocompletion of parameter in vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Nov 3, 2023
1 parent a0eeca4 commit 3d877ff
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@
basemap - Plot base maps and frames for the figure.
"""

from typing import TypedDict, Unpack

from pygmt.clib import Session
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias


class Parameters(TypedDict):
region: str
projection: str
zscale: str
zsize: str
frame: str
map_scale: str
box: str
rose: str
compass: str
verbose: bool
panel: str
coltypes: str
perspective: str
transparency: str


@fmt_docstring
@use_alias(
R="region",
Expand All @@ -24,7 +43,7 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
def basemap(self, **kwargs):
def basemap(self, **kwargs: Unpack[Parameters]):
r"""
Plot base maps and frames for the figure.
Expand Down

0 comments on commit 3d877ff

Please sign in to comment.