In the code, there was often both a check for whether a certain key was in a dict and a conditional access of the corresponding value. This can be elegantly combined in a single call to the dict get method, whose default value if the key is not in the dict is None.
Using the get method instead of the check and conditional access makes it possible to simplify the code in various places.
This is done so in this patch.
Coverage decreased (-0.01%) to 97.868% when pulling bafb96e3e8daf92796e72ba624097815e16fe2cc on equaeghe:equaeghe-patch-1 into 24aac8629f6a50ab262727815107384e0682cf42 on Alir3z4:master.
In the code, there was often both a check for whether a certain key was in a dict and a conditional access of the corresponding value. This can be elegantly combined in a single call to the dict get method, whose default value if the key is not in the dict is None. Using the get method instead of the check and conditional access makes it possible to simplify the code in various places. This is done so in this patch.