When using the @alg decorator to scaffold a processing algorithm, we use the @alg.input to declare new widgets for the interface. We can declare these as alg.SOURCE for layers we use in the algorithm.
Unlike the standard approach, there does not appear to be a place where we can identify allowable geometry types (Point/Line/Polygon) for the layer. I've tried adding a parameter types=[QgsWkbTypes.MultiLineString] however, it does not appear to filter the allowable selections in the drop-down. I still get polygons and points as well.
Is this a bug because while the @alg.input accepts the types=[] parameter, it does not appear to have any impact on what appears in the dropdown?
import pyodbc
from PyQt5.QtCore import QVariant
from qgis import processing
from qgis.processing import alg
from qgis.core import QgsProject, QgsFeatureRequest, QgsDataSourceUri, QgsVectorLayer,\
QgsFeatureSink, QgsWkbTypes, QgsCoordinateReferenceSystem, QgsField, QgsFeature,\
QgsVectorFileWriter, QgsProcessingException
@alg(name='roadsassessment', label='Call 3 Mobile Roads Assessment', group='bbfcall3', group_label='BBF Call 3')
@alg.input(type=alg.INT, name='APPNUM', label='Application number')
@alg.input(type=alg.SOURCE, name='ELIGIBLEROADSSOURCE', types= [QgsWkbTypes.MultiLineString], label='Eligible Roads')
@alg.input(type=alg.SOURCE, name='APPCOVERAGESOURCE', types=[QgsWkbTypes.MultiPolygon], label='Application coverage')
@alg.input(type=alg.SOURCE, name='MOBILECOVERAGESOURCE', label='Full mobile coverage')
