Open Scoder12 opened 1 week ago
why would it need to be an r
string? IIRC that applies different syntaxes to make some regex string escapes better, but there's nothing invalid here.
It works fine now, but it's deprecated and will cause a syntax error in the future
$ python -Wd -c 'print("\s")'
<string>:1: DeprecationWarning: invalid escape sequence '\s'
\s
Fascinating and (imo) stupid: they should never break working code.
From https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
Changed in version 3.6: Unrecognized escape sequences produce a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning).
Changed in version 3.12: Unrecognized escape sequences produce a [SyntaxWarning](https://docs.python.org/3/library/exceptions.html#SyntaxWarning). In a future Python version they will be eventually a [SyntaxError](https://docs.python.org/3/library/exceptions.html#SyntaxError).
Good catch @Scoder12 feel free to make a PR :)
Will be fixed as part of #439
My editor just caught this while working on the code:
https://github.com/pwncollege/dojo/blob/3878ec0320c953d3e9f7d058f97318d7c79c04ec/dojo_plugin/api/v1/docker.py#L62
Shouldn't this be an
r"
string?