SNSystems / dexter

DExTer - Debug Experience Tester
MIT License
33 stars 6 forks source link

TomWeaver18 - refactor safe eval #8

Closed TomWeaver18 closed 5 years ago

TomWeaver18 commented 5 years ago

Greetings fellow DexTerians,

I present another refactor patch, this time focusing on _safe_eval which was, imo, a bit of a mess.

I've heavily refactored, adding a new class to handle safe evaluations along with 2 new exceptions that are used internally in the new SafeEvaluator class.

all previous unit tests still pass, lint and pylama show no complaints but I am using an up-to-date version of YAPF that heavily modified 8/9 other files, so this step has been omitted to avoid pollution of the change.

happy reviewing Tom

jmorse commented 5 years ago

LGTM, that functionality can now actually be understood, which is great.

TomWeaver18 commented 5 years ago

Safe eval is being removed by a later patch.

RIP the patch that could, but never would!