uap-python icon indicating copy to clipboard operation
uap-python copied to clipboard

Remove deprecated and dead code

Open masklinn opened this issue 3 years ago • 1 comments

Also remove MultiReplace and replace it by native regex template expansion.

It does require a bit more preprocessing (to convert the replacement templates from JS to Python backreferences) but otherwise seems way cleaner.

masklinn avatar May 01 '22 19:05 masklinn

This is a bit of a dodgy one, and definitely not for 0.15. Especially since it seems to require dropping 2.7, probably because

Changed in version 3.5: Unmatched groups are replaced with an empty string.

Though I guess we could always vendor sre_parse.expand_template, that seems standalone.

Well except for the part where it also needs parse_template... and at that point it's not really any better / clearer / simpler than MultiReplace.

Could also include updating the project structure (https://hynek.me/articles/testing-packaging/), packaging (pyproject.toml?), etc..?

masklinn avatar May 01 '22 19:05 masklinn