added conditional to check python syntax in pre_save events on linting