alexmojaki / pure_eval

Safely evaluate AST nodes without side effects
MIT License
42 stars 14 forks source link

Allow evaluation of lists/tuples/sets/dicts #6

Closed pwwang closed 3 years ago

pwwang commented 3 years ago

5

alexmojaki commented 3 years ago

Thanks for the PR! The tests are good, the implementation is a good start, but it has a decent amount of duplicated logic and duplicated computation. Can you refactor it a bit?

pwwang commented 3 years ago

Are you referring to the Evaluator._handle method / Evaluator class or the whole package?

alexmojaki commented 3 years ago

The code you added to _handle, considered in isolation

pwwang commented 3 years ago

I am actually not quite sure if this is what you wanted it to be...

alexmojaki commented 3 years ago

That's the kind of thing I meant, yes. Looks like travis is being weird, will check on this again later.

pwwang commented 3 years ago

This isn't the first time that travis gets stuck. You probably want to switch to GH actions ...

alexmojaki commented 3 years ago

Indeed, I recently did that for the first time with executing because Travis is going through some changes. But it's still enough of a pain that I'm going to procrastinate it. Looks like travis woke up in the end. Thanks for the PR!