Skip to content

Commit b327f6b

Browse files
committed
Qual. Replace 'if "ext" in dict_.keys()' with 'if "str" in dict_'
1 parent b43c820 commit b327f6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shapefile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ def __init__(self, *args, **kwargs):
10991099
return
11001100

11011101
# Otherwise, load from separate shp/shx/dbf args (must be path or file-like)
1102-
if "shp" in kwargs.keys():
1102+
if "shp" in kwargs:
11031103
if hasattr(kwargs["shp"], "read"):
11041104
self.shp = kwargs["shp"]
11051105
# Copy if required
@@ -1111,7 +1111,7 @@ def __init__(self, *args, **kwargs):
11111111
(baseName, ext) = os.path.splitext(kwargs["shp"])
11121112
self.load_shp(baseName)
11131113

1114-
if "shx" in kwargs.keys():
1114+
if "shx" in kwargs:
11151115
if hasattr(kwargs["shx"], "read"):
11161116
self.shx = kwargs["shx"]
11171117
# Copy if required
@@ -1123,7 +1123,7 @@ def __init__(self, *args, **kwargs):
11231123
(baseName, ext) = os.path.splitext(kwargs["shx"])
11241124
self.load_shx(baseName)
11251125

1126-
if "dbf" in kwargs.keys():
1126+
if "dbf" in kwargs:
11271127
if hasattr(kwargs["dbf"], "read"):
11281128
self.dbf = kwargs["dbf"]
11291129
# Copy if required

0 commit comments

Comments
 (0)