Selecting verices by angle
Select inline verts.
Quick edit mode bmesh script. Run in vert select mode.  Selects all vertices connected to 2 edges that have an angle of within 2 degrees of  180 degrees.  Think of it like a clock, and the angle between the two hands with respect to the clock centre.
import bpy
import bmesh
from math import pi, radians

context = bpy.context

ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

def is_inline(vert, eps=1e-4):
    
    o = vert.co
    e0, e1 = v.link_edges
    v0 = e0.other_vert(vert).co - o
    v1 = e1.other_vert(vert).co - o
    return pi - v0.angle(v1) &lt; eps

for v in bm.verts:
    v.select_set(
            len(v.link_edges) == 2
            and is_inline(v, eps=radians(2))
            )
            
bmesh.update_edit_mesh(me)