pygmt.params.Pattern: Set default pattern value to 1 plus extra validation checks#4134
pygmt.params.Pattern: Set default pattern value to 1 plus extra validation checks#4134
Conversation
Set default pattern value as None to fix autodoc warning about `AttributeError: type object 'Pattern' has no attribute 'pattern'`. Add proper validation to ensure non-int and non-PathLike values will raise a GMTValueError.
|
Originally posted by @yvonnefroehlich in #4100
@yvonnefroehlich, I've fixed the AttributeError, but the Windows docs build still shows as failing at https://github.com/GenericMappingTools/pygmt/actions/runs/18149651674/job/51657848578#step:7:1735 with |
|
What about default to pattern 1? |
Great, thanks 🙂! |
Co-authored-by: Dongdong Tian <[email protected]>
|
/format |
seisman
left a comment
There was a problem hiding this comment.
OK to merge after the CI passes.
|
/format |
|
/format |
Looks good! No warnings anymore 🙂. |
Description of proposed changes
Set default pattern value as 1 to fix autodoc warning about
AttributeError: type object 'Pattern' has no attribute 'pattern'. Add proper validation to ensure non-int and non-PathLike values will raise a GMTValueError.Addresses #4100 (comment), patches #4020
Preview: https://pygmt-dev--4134.org.readthedocs.build/en/4134/api/generated/pygmt.params.Pattern.html
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash command is:
/format: automatically format and lint the code