Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2019-09-04 | mintro: Fix resolving nodes in kwargs (fixes #5884) | Daniel Mensinger | 1 | -42/+66 | |
2019-08-12 | Add is_disabler function | James Hilliard | 1 | -0/+1 | |
This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> | |||||
2019-07-31 | mintro: Fix crash related to the sources kwarg (fixes #5741) | Daniel Mensinger | 1 | -1/+1 | |
2019-07-10 | Add alias_target() function | Xavier Claessens | 1 | -0/+1 | |
2019-05-13 | ast: fix #5376 | Daniel Mensinger | 1 | -2/+8 | |
2019-04-23 | ast: Address code review | Daniel Mensinger | 1 | -3/+7 | |
2019-04-23 | make flake8 happy | Daniel Mensinger | 1 | -1/+0 | |
2019-04-23 | ast: Make sure to avoid infinite recursions | Daniel Mensinger | 1 | -9/+9 | |
2019-04-23 | ast: support elementary object methods | Daniel Mensinger | 1 | -6/+40 | |
2019-04-23 | ast: resolve simple arithmetic nodes | Daniel Mensinger | 1 | -4/+29 | |
2019-04-23 | ast: resolve ID nodes in flatten_args | Daniel Mensinger | 1 | -20/+23 | |
2019-04-23 | Don't use mutable types as default arguments | Dylan Baker | 1 | -3/+3 | |
This isn't safe given the way python implements default arguments. Basically python store a reference to the instance it was passed, and then if that argument is not provided it uses the default. That means that two calls to the same function get the same instance, if one of them mutates that instance every subsequent call that gets the default will receive the mutated instance. The idiom to this in python is to use None and replace the None, def in(value: str, container: Optional[List[str]]) -> boolean: return src in (container or []) if there is no chance of mutation it's less code to use or and take advantage of None being falsy. If you may want to mutate the value passed in you need a ternary (this example is stupid): def add(value: str, container: Optional[List[str]]) -> None: container = container if container is not None else [] container.append(value) I've used or everywhere I'm sure that the value will not be mutated by the function and erred toward caution by using ternaries for the rest. | |||||
2019-04-13 | mintro: Fix set_variable plus assign bug (closes #5256) | Daniel Mensinger | 1 | -0/+1 | |
2019-04-02 | mintro: fix some interpreter crashes | Daniel Mensinger | 1 | -0/+24 | |
2019-03-04 | rewriter: Handle duplicate target | Daniel Mensinger | 1 | -2/+3 | |
2019-02-16 | Can now find the assignment node of a value | Daniel Mensinger | 1 | -1/+16 | |
2019-02-16 | Merge pull request #4858 from mensinda/rwKWARGS | Jussi Pakkanen | 1 | -2/+2 | |
rewriter: Add support for kwargs modification | |||||
2019-02-01 | Ensure that func dicts provide the same set of functions | Daniel Mensinger | 1 | -0/+10 | |
2019-01-31 | Some fixes and assignment based target find | Daniel Mensinger | 1 | -2/+2 | |
2019-01-22 | Fixed flake8 issues | Daniel Mensinger | 1 | -2/+2 | |
2019-01-22 | First rewriter test case | Daniel Mensinger | 1 | -1/+1 | |
2019-01-22 | Added support for assignments in the AST interpretor | Daniel Mensinger | 1 | -2/+9 | |
2019-01-22 | Added target AST Interpreter support | Daniel Mensinger | 1 | -6/+23 | |
2019-01-22 | Removed the RewriteIntrepreter | Daniel Mensinger | 1 | -144/+0 | |
2019-01-22 | Moved the introspection interpreter | Daniel Mensinger | 1 | -4/+1 | |
2019-01-22 | Basic AST visitor pattern | Daniel Mensinger | 1 | -0/+332 | |