From 7c3c6b4b0002b671df9c17ac21fd02272c05e8de Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 1 Apr 2022 09:47:05 -0400 Subject: [PATCH] Check that argument is not None or False --- pygmt/helpers/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygmt/helpers/utils.py b/pygmt/helpers/utils.py index 0413b824c60..f9f1568ed87 100644 --- a/pygmt/helpers/utils.py +++ b/pygmt/helpers/utils.py @@ -323,4 +323,6 @@ def args_in_kwargs(args, kwargs): >>> args_in_kwargs(args=["A", "B"], kwargs={"B": 0}) True """ - return any(kwargs.get(arg) for arg in args) + return any( + kwargs.get(arg) is not None and kwargs.get(arg) is not False for arg in args + )