You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are lots of locations in the code I have noticed where the conditional if/else logic can be streamlined or improved, so it flows more intuitively and reduces the need for extra levels of indentation, etc.
This is both in the sense of direct small-scale conversions, for example, there is a whole similar block that can be reduced with elif statements here:
# Use accumulated plot limits if making a multiple line plot
ifplotvars.graph_xminisNone:
plotvars.graph_xmin=minx
else:
ifminx<plotvars.graph_xmin:
plotvars.graph_xmin=minx
ifplotvars.graph_xmaxisNone:
plotvars.graph_xmax=maxx
else:
ifmaxx>plotvars.graph_xmax:
plotvars.graph_xmax=maxx
ifplotvars.graph_yminisNone:
plotvars.graph_ymin=miny
else:
ifminy<plotvars.graph_ymin:
plotvars.graph_ymin=miny
ifplotvars.graph_ymaxisNone:
plotvars.graph_ymax=maxy
else:
ifmaxy>plotvars.graph_ymax:
plotvars.graph_ymax=maxy
as well as larger-scale changes to the conditional structure. All of which should not change the behaviour of the code in any way, only its implementation, to make it easier to work with and develop on top of.
The text was updated successfully, but these errors were encountered:
There are lots of locations in the code I have noticed where the conditional
if/else
logic can be streamlined or improved, so it flows more intuitively and reduces the need for extra levels of indentation, etc.This is both in the sense of direct small-scale conversions, for example, there is a whole similar block that can be reduced with
elif
statements here:cf-plot/cfplot/cfplot.py
Lines 8967 to 8990 in efe94c7
as well as larger-scale changes to the conditional structure. All of which should not change the behaviour of the code in any way, only its implementation, to make it easier to work with and develop on top of.
The text was updated successfully, but these errors were encountered: