Skip to content

Commit 8dc7d05

Browse files
committed
removing None check in hasParam
1 parent a1b885c commit 8dc7d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/ml/param/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def hasParam(self, paramName):
163163
"""
164164
if isinstance(paramName, str):
165165
p = getattr(self, paramName, None)
166-
return p is not None and isinstance(p, Param)
166+
return isinstance(p, Param)
167167
else:
168168
raise TypeError("hasParam(): paramName must be a string")
169169

0 commit comments

Comments
 (0)