basemap
basemap copied to clipboard
Error in indentation?
Is the indentation wrong here? The current indentation causes polygons and polygon_types to have different number of elements under some circumstances.
https://github.com/matplotlib/basemap/blob/master/lib/mpl_toolkits/basemap/init.py#L1419
I may be wrong. Currently testing some stuff.
Good question. Most of the time in this method, the two appends are together, but this segment of code seems a bit different. It might be right, but I really don't know for certain. Attn: @jswhit
Actually it might be a couple of lines above that one: https://github.com/matplotlib/basemap/blob/master/lib/mpl_toolkits/basemap/init.py#L1415
I tried indenting the line I originally referred to and it didn't change anything.
Looks like you want to indent the append(typ) in line 1419 and add another append(typ) line after 1415.
It would be good to first have unit tests that demonstrates a problem. It is entirely feasible that that for-loop around L1415 only ever adds a single element to the list. I just haven't groked the logic here enough to know that for certain.