fix a typing error in PYCore