matej_suchanek added a comment. |
In T175399#3592968, @Mpaa wrote:Replacement management in replace.py gives me a headache.
Me too after your clarification. But I believe we can handle that.
There is just a few scenarios: (pwb.py replace only run with...)
- -manualinput with one or more pairs
- a single -fix
- multiple -fix'es
- one or more -fix'es and -manualinput with one or more pairs
My opinion:
- -regex (-dotall, -nocase etc.) shouldn't influence individual fixes
- when only -fix'es are requested, all of them should inherit all exceptions (-excepttext etc.)
- when all replacements come from command line, apply exceptions to all of them ("squash" replacements to a single -fix)
Now there's only one remaining point: combined input. I would introduce a new -inherit argument that would optionally make all command line exceptions inherited to all fixes (as well as the "squashed" one), otherwise (default behavior) it would only be relevant for command line replacements.
Comments?
TASK DETAIL
EMAIL PREFERENCES
To: matej_suchanek
Cc: Mpaa, Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
Cc: Mpaa, Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs