-
Notifications
You must be signed in to change notification settings - Fork 235
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Here are some limitations of the kwargs_to_strings decorator:
- Doesn't work for the default values of parameters:
Please note that we can't use decorator
@kwargs_to_strings(offset="sequence")here, because the decorator can only deal with keyword arguments and doesn't work for the default values. I.e., it doesn't work forFigure.timestamp()but works forFigure.timestamp(offset=["-54p", "-54p"]), although offset defaults to["-54p", "-54p"].
@kwargs_to_strings(offset="sequence")
def timestamp(
self,
text=None,
label=None,
justification="BL",
offset=("-54p", "-54p"),
font="Helvetica",
timefmt="%Y %b %d %H:%M:%S",
):- Doesn't work if the parameter name is not given
>>> from pygmt import which
>>> # doesn't work
>>> which(["@hotspots.txt", "@earth_relief_01d_g"])
gmtwhich [ERROR]: File ['@hotspots.txt', not found!
gmtwhich [ERROR]: File '@earth_relief_01d_g'] not found!
>>> # works
>>> which(fname=["@hotspots.txt", "@earth_relief_01d_g"])Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working