I've been working with ESRI Python toolboxes for a while but I'm still having difficulties setting an input parameter as a "DEWorkspace" and using the parameter filter to make it so only file geodatabases are visible to the end user when entering parameters.
I'm using 10.5 and this is the ESRI documentation
<SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">param0 </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> arcpy</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">Parameter</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">(
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">displayName</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"Input Workspace"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
name</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"in_workspace"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
datatype</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"DEWorkspace"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
parameterType</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"Required"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
direction</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"Input"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">)
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"></SPAN><SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"># Set the filter to accept only local (personal or file) geodatabases</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
param0</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">filter</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">list </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">[</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">"Local Database"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">]</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
params </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> </SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">[</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">param0</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">]</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">
</SPAN><SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;">return</SPAN><SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"> params
</SPAN>
The problem I'm encountering is that this filter doesn't seem to actually limit what the end user can see or enter as parameter. For example when they navigate to provide a file geodatabse the dialog allows them to see and enter .lyr files.

I'm assuming that you should be able to limit what the end user can see and enter when it comes to workspaces?
PythonGIS Developers