File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -1755,7 +1755,7 @@ def virtualfile_from_stringio(
17551755 @deprecate_parameter (
17561756 "required_data" , "required" , "v0.16.0" , remove_version = "v0.20.0"
17571757 )
1758- def virtualfile_in ( # noqa: PLR0912
1758+ def virtualfile_in (
17591759 self ,
17601760 check_kind = None ,
17611761 data = None ,
@@ -1847,7 +1847,7 @@ def virtualfile_in( # noqa: PLR0912
18471847 )
18481848 mincols = 3
18491849
1850- kind = data_kind (data , required = required )
1850+ kind = data_kind (data , required = required , check_kind = check_kind )
18511851 _validate_data_input (
18521852 data = data ,
18531853 x = x ,
@@ -1858,16 +1858,6 @@ def virtualfile_in( # noqa: PLR0912
18581858 kind = kind ,
18591859 )
18601860
1861- if check_kind :
1862- valid_kinds = ("file" , "arg" ) if required is False else ("file" ,)
1863- if check_kind == "raster" :
1864- valid_kinds += ("grid" , "image" )
1865- elif check_kind == "vector" :
1866- valid_kinds += ("empty" , "matrix" , "vectors" , "geojson" )
1867- if kind not in valid_kinds :
1868- msg = f"Unrecognized data type for { check_kind } : { type (data )} ."
1869- raise GMTInvalidInput (msg )
1870-
18711861 # Decide which virtualfile_from_ function to use
18721862 _virtualfile_from = {
18731863 "arg" : contextlib .nullcontext ,
You can’t perform that action at this time.
0 commit comments