Add W605 warning for invalid escape sequences in string literals

Starting with Python 3.6, invalid escape sequences in string literals
are now deprecated. In a future version of Python, invalid escape
sequences will be a syntax error. While this deprecation produces a
runtime warning, it only appears if warnings are enabled and the first
time the Python source is compiled to byte code. By adding a check to
pycodestyle, projects can take advantage of static analysis to catch and
fix these future syntax errors.

For more information on the deprecation, see the Python release notes,
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior

> A backslash-character pair that is not a valid escape sequence now
> generates a DeprecationWarning. Although this will eventually become a
> SyntaxError, that will not be for several Python releases.

Fixes #633
5 files changed