bpo-31161: only check for parens error for SyntaxError (#3082)

Subclasses such as IndentError and TabError should not have this message
applied.
3 files changed