You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Limitations of the kwargs_to_strings decorator not handling positional arguments #2361
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 for Figure.timestamp() but works for Figure.timestamp(offset=["-54p", "-54p"]), although offset defaults to ["-54p", "-54p"].
changed the title [-]Limitations of the kwargs_to_strings decorator[/-][+]Limitations of the kwargs_to_strings decorator not handling positional arguments[/+]on Oct 15, 2023
Should we remove sequence_space entirely since it is only used in pygmt.which and fig.text? And use the if is_nonstr_iter(fname): fname = " ".join(fname) patch in #2726?
And use the if is_nonstr_iter(fname): fname = " ".join(fname) patch in #2726?
No, it won't work for Figure.text, because textfiles can be a 2-D array, e.g., textfiles=[[1, 2, "A"], [3, 4, "B"]].
Ah ok, you're right. Let's keep sequence_space then. So #2726 will fix this issue entirely? Can we change Addresses #2726 to Fixes #2726 or was there something else?
Activity
[-]Limitations of the kwargs_to_strings decorator[/-][+]Limitations of the kwargs_to_strings decorator not handling positional arguments[/+]weiji14 commentedon Oct 15, 2023
This issue would also apply to
fig.text'stextfilesparameter that usessequence_spaceadded in #325.pygmt/pygmt/src/text.py
Lines 41 to 50 in c9d6147
Should we remove
sequence_spaceentirely since it is only used inpygmt.whichandfig.text? And use theif is_nonstr_iter(fname): fname = " ".join(fname)patch in #2726?seisman commentedon Oct 15, 2023
No, it won't work for
Figure.text, becausetextfilescan be a 2-D array, e.g.,textfiles=[[1, 2, "A"], [3, 4, "B"]].weiji14 commentedon Oct 15, 2023
Ah ok, you're right. Let's keep
sequence_spacethen. So #2726 will fix this issue entirely? Can we changeAddresses #2726toFixes #2726or was there something else?seisman commentedon Oct 15, 2023
No, see the first point: