change self to expr in staticmethod [skip ci]