Fix invalid escape sequences
Fixes: hy/cmdline.py:175: DeprecationWarning: invalid escape sequence \_ tests/lex/test_lex.py:267: DeprecationWarning: invalid escape sequence \s tests/compilers/test_compiler.py:45: DeprecationWarning: invalid escape sequence \* when run against Python 3.6 with warnings enabled.
This commit is contained in:
parent
99b0bd0424
commit
7aaf5f5330
@ -144,7 +144,7 @@ def koan_macro():
|
||||
@macro("ideas")
|
||||
def ideas_macro():
|
||||
return HyExpression([HySymbol('print'),
|
||||
HyString("""
|
||||
HyString(r"""
|
||||
|
||||
=> (import [sh [figlet]])
|
||||
=> (figlet "Hi, Hy!")
|
||||
|
@ -42,7 +42,7 @@ class CompilerTest(unittest.TestCase):
|
||||
self.assert_(callable(compiler.builds("foo_bar")))
|
||||
self.assert_(callable(compiler.builds("-")))
|
||||
self.assertRaisesRegexp(TypeError,
|
||||
"\*post\* translated strings",
|
||||
r"\*post\* translated strings",
|
||||
compiler.builds, "foobar-with-dash-")
|
||||
|
||||
|
||||
|
@ -264,7 +264,7 @@ def test_escapes():
|
||||
entry = tokenize("(foo \"foo\\n\")")[0]
|
||||
assert entry[1] == "foo\n"
|
||||
|
||||
entry = tokenize("(foo \"foo\s\")")[0]
|
||||
entry = tokenize("(foo \"foo\\s\")")[0]
|
||||
assert entry[1] == "foo\\s"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user