Skip to content

Commit 3d877ff

Browse files
committed
Autocompletion of parameter in vscode
1 parent a0eeca4 commit 3d877ff

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

pygmt/src/basemap.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,29 @@
22
basemap - Plot base maps and frames for the figure.
33
"""
44

5+
from typing import TypedDict, Unpack
6+
57
from pygmt.clib import Session
68
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias
79

810

11+
class Parameters(TypedDict):
12+
region: str
13+
projection: str
14+
zscale: str
15+
zsize: str
16+
frame: str
17+
map_scale: str
18+
box: str
19+
rose: str
20+
compass: str
21+
verbose: bool
22+
panel: str
23+
coltypes: str
24+
perspective: str
25+
transparency: str
26+
27+
928
@fmt_docstring
1029
@use_alias(
1130
R="region",
@@ -24,7 +43,7 @@
2443
t="transparency",
2544
)
2645
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
27-
def basemap(self, **kwargs):
46+
def basemap(self, **kwargs: Unpack[Parameters]):
2847
r"""
2948
Plot base maps and frames for the figure.
3049

0 commit comments

Comments
 (0)