@@ -236,7 +236,7 @@ def psconvert(self, **kwargs):
236
236
kwargs ["A" ] = ""
237
237
238
238
prefix = kwargs .get ("F" )
239
- if prefix in [ "" , None , False , True ] :
239
+ if prefix in { "" , None , False , True } :
240
240
raise GMTInvalidInput (
241
241
"The 'prefix' parameter must be specified with a valid value."
242
242
)
@@ -363,7 +363,7 @@ def savefig( # noqa: PLR0912
363
363
kwargs ["Qg" ] = 2
364
364
365
365
if worldfile :
366
- if ext in [ "eps" , "kml" , "pdf" , "tiff" ] :
366
+ if ext in { "eps" , "kml" , "pdf" , "tiff" } :
367
367
raise GMTInvalidInput (
368
368
f"Saving a world file is not supported for '{ ext } ' format."
369
369
)
@@ -444,7 +444,7 @@ def show(self, dpi=300, width=500, method=None, waiting=0.5, **kwargs):
444
444
if method is None :
445
445
method = SHOW_CONFIG ["method" ]
446
446
447
- if method not in [ "external" , "notebook" , "none" ] :
447
+ if method not in { "external" , "notebook" , "none" } :
448
448
raise GMTInvalidInput (
449
449
f"Invalid display method '{ method } ', "
450
450
"should be either 'notebook', 'external', or 'none'."
@@ -583,7 +583,7 @@ def set_display(method=None):
583
583
>>> pygmt.set_display(method=None)
584
584
>>> fig.show() # again, will show a PNG image in the current notebook
585
585
"""
586
- if method in [ "notebook" , "external" , "none" ] :
586
+ if method in { "notebook" , "external" , "none" } :
587
587
SHOW_CONFIG ["method" ] = method
588
588
elif method is not None :
589
589
raise GMTInvalidInput (
0 commit comments