-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TestDeepScan.py #1357
base: master
Are you sure you want to change the base?
Update TestDeepScan.py #1357
Conversation
Test are broken. Are all commits pushed to this PR? |
@verdy-p Yes, please address the build error as @abitrolly mentioned For convenience, here is the error from AppVeyor
Full log: https://ci.appveyor.com/project/az0/bleachbit/builds/43277935#L2245 |
This is a building process error, and not an invalid regexp.
I think that AppSurveyor is confused, maybe by the ```(:encryptable)```` part. But the regexp is valid in all Regexp syntaxes checked for example on https://regex101.com/ There's no such error report when using it in any version of Python I know. This is then an unexeplained bug of AppSurveyor making an incorrect parsing. |
@verdy-p did you run the test you've modified yourself? I see at least one logical error in this modification. |
Yes I have run this in BleachBit itself. It works perfectly (and it is considerably faster too! in fact the "for" loop here is not necessary as it will loop only once, but it has been kept) What can of logical error do you see? Here the regexp is anchored on both sides (start and end), and the two regexps '~$', 'bak$' have been anchored too, by prefixing them by '[^.].*' (to exclude "hidden" filenames starting by a dot, that should not be "cleaned", then match remaining characters of the filename). This change however does not invalidate the regexp. This is a one-line modification, only in the regexp string, and the regexp is perfectly valid, in Python (the parsing made by AppSurveyor is clearly wrong, all parentheses are correctly paired). Note that AppSurveyor compiles the regexp in the source, but does not show which "flags" it uses to compile the constant string containing the regexp. Does AppSurveyor use the standard regexp engine of Python (the same engine as used by Bleachbit itself)? |
Want to try with the new mkhon-python310 branch? It is a major update of the Python version |
safer exclusion of
*~
backup files starting by a file, and the last character before~
may be also a digit (e.g.index.php7~
orREADME2~