Kronuz/pyScss

Deprecation warning due to invalid escape sequences

tirkarthi opened this issue · 0 comments

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -v example | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./scss/tests/test_misc.py:55: DeprecationWarning: invalid escape sequence \:
  expected = """\
./scss/tests/from_ruby/_test_scss.py:246: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$media: print;
./scss/tests/from_ruby/_test_scss.py:259: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$family: unquote("Droid+Sans");
./scss/tests/from_ruby/_test_scss.py:810: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:820: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:830: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:840: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b, $c, $d) {
./scss/tests/from_ruby/_test_scss.py:851: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b, $c, $d) {
./scss/tests/from_ruby/_test_scss.py:861: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:872: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b, $c...) {
./scss/tests/from_ruby/_test_scss.py:883: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:894: DeprecationWarning: invalid escape sequence \#
  ''' == render('''@function foo($a...) {
./scss/tests/from_ruby/_test_scss.py:907: DeprecationWarning: invalid escape sequence \#
  render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:919: DeprecationWarning: invalid escape sequence \#
  render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:931: DeprecationWarning: invalid escape sequence \#
  render('''@function foo($a, $b...) {
./scss/tests/from_ruby/_test_scss.py:956: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo \#{1 + 2} baz {a: b}
./scss/tests/from_ruby/_test_scss.py:960: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo\#{".bar"} baz {a: b}
./scss/tests/from_ruby/_test_scss.py:964: DeprecationWarning: invalid escape sequence \#
  ''' == render('''\#{"foo"}.bar baz {a: b}
./scss/tests/from_ruby/_test_scss.py:970: DeprecationWarning: invalid escape sequence \#
  ''' == render('''\#{"foo" + " bar"} {a: b}
./scss/tests/from_ruby/_test_scss.py:976: DeprecationWarning: invalid escape sequence \#
  ''' == render('''\#{"foo" + " bar"}baz {a: b}
./scss/tests/from_ruby/_test_scss.py:982: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo[val="bar \#{"foo" + " bar"} baz"] {a: b}
./scss/tests/from_ruby/_test_scss.py:988: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo:nth-child(\#{5 + "n"}) {a: b}
./scss/tests/from_ruby/_test_scss.py:994: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$zzz: zzz;
./scss/tests/from_ruby/_test_scss.py:1001: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$zzz: zzz;
./scss/tests/from_ruby/_test_scss.py:1008: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$zzz: zzz;
./scss/tests/from_ruby/_test_scss.py:1015: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$zzz: zzz;
./scss/tests/from_ruby/_test_scss.py:1022: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$zzz: zzz;
./scss/tests/from_ruby/_test_scss.py:1029: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$a : a;
./scss/tests/from_ruby/_test_scss.py:1037: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$a: a;
./scss/tests/from_ruby/_test_scss.py:1046: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$subject: "!";
./scss/tests/from_ruby/_test_scss.py:1054: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo {bar\#{"baz" + "bang"}: blip}
./scss/tests/from_ruby/_test_scss.py:1058: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo {bar\#{1 + 2}: blip}
./scss/tests/from_ruby/_test_scss.py:1064: DeprecationWarning: invalid escape sequence \#
  ''' == render('''foo {\#{"baz" + "bang"}: blip}
./scss/tests/from_ruby/_test_scss.py:1070: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$baz: 12;
./scss/tests/from_ruby/_test_scss.py:1077: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$baz: 12;
./scss/tests/from_ruby/_test_scss.py:1084: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$media1: screen;
./scss/tests/from_ruby/_test_scss.py:1105: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$constraint: "(max-width: 300px)";
./scss/tests/from_ruby/_test_scss.py:1125: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$domain: "sass-lang.com";
./scss/tests/from_ruby/_test_scss.py:1138: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$query: "(feature1: val)";
./scss/tests/from_ruby/_test_scss.py:1170: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$domain: "sass-lang.com";
./scss/tests/from_ruby/_test_scss.py:1365: DeprecationWarning: invalid escape sequence \#
  render('''foo {
./scss/tests/from_ruby/_test_scss.py:1377: DeprecationWarning: invalid escape sequence \#
  render("\n\nfoo \#{\") bar\"} {a: b}")
./scss/tests/from_ruby/_test_scss.py:1456: DeprecationWarning: invalid escape sequence \#
  ''' == render('''a { -\#{"foo"}-bar: b; }
./scss/tests/from_ruby/_test_scss.py:1468: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$value : bip;
./scss/tests/from_ruby/_test_scss.py:1478: DeprecationWarning: invalid escape sequence \#
  ''' == render('''a.\#{"foo"} b
./scss/tests/from_ruby/_test_scss.py:1499: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$bar : "#foo";
./scss/tests/from_ruby/_test_scss.py:1600: DeprecationWarning: invalid escape sequence \#
  ''' == render('''$color: blue;
./scss/tests/from_ruby/test_extend.py:1120: DeprecationWarning: invalid escape sequence \#
  assert_rendering('''\
./scss/tests/from_ruby/test_extend.py:1141: DeprecationWarning: invalid escape sequence \#
  assert_rendering('''\
./scss/tests/from_ruby/test_extend.py:1215: DeprecationWarning: invalid escape sequence \#
  assert_rendering('''\
./scss/cssdefs.py:497: DeprecationWarning: invalid escape sequence \s
  _has_code_re = re.compile('''
./scss/compiler.py:1430: DeprecationWarning: invalid escape sequence \:
  result = tb * (i + nesting) + "@media -sass-debug-info{filename{font-family:file\:\/\/%s}line{font-family:\\00003%s}}" % (filename, lineno) + nl