How to select all objects of a certain viewport draw type in blender 2.8? Due to having bool tool a lot in my recent work, it the cutting objects' draw type to box. I now need them in wireframe mode but due to the mixture of objects with several draw types in my scene, it would be difficult to set the draw types of the objects individually hence the importance of this function.
Quick little script

The following script changes all objects in the context scene  displayed as bounds to wire.

import bpy
context = bpy.context
scene = context.scene
bounds = [o for o in scene.objects if o.display_type == 'BOUNDS']

for o in bounds:
    o.display_type = 'WIRE'


It is often more useful to use the selection, replace scene.objects with context.selected_objects to only change only those in selection that match the criteria.