how to get curve type of TopoDS_Wire object

I use python with pythonOCC to plot a circle in TopoDS_Wire.

But cannot get the GeomAbs_Circle type back via this TopoDS_Wire object, and I always get GeomAbs_OtherCurve type.

My test code is below. Does anyone know how to get the correct type of curve?

from OCC.Core.BRepAdaptor import BRepAdaptor_CompCurve
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire
from import gp_Ax2, gp_Circ, gp_Dir, gp_Pnt

circle = gp_Circ( gp_Ax2( gp_Pnt( 0., 0., 0. ), gp_Dir( 1., 0., 0.  ) ), 30 )

edge   = BRepBuilderAPI_MakeEdge( circle ).Edge()

wire   = BRepBuilderAPI_MakeWire( edge ).Wire()

curve  = BRepAdaptor_CompCurve( wire )

print( curve.GetType() )