Python static type and rule checker