Merge pull request #2195 from sobolevn/patch-1

Use raw strings to define a regex in `packer.py`
This commit is contained in:
Liam Newman 2023-11-06 15:59:47 -08:00 committed by GitHub
commit 425755f12a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ def detect(source):
begin_offset = -1
"""Detects whether `source` is P.A.C.K.E.R. coded."""
mystr = re.search(
"eval[ ]*\([ ]*function[ ]*\([ ]*p[ ]*,[ ]*a[ ]*,[ ]*c["
r"eval[ ]*\([ ]*function[ ]*\([ ]*p[ ]*,[ ]*a[ ]*,[ ]*c["
" ]*,[ ]*k[ ]*,[ ]*e[ ]*,[ ]*",
source,
)