Closed leewujung closed 8 months ago
The below section can be disentangled by doing all the current else (error) conditions first. In that case, when the else (error) conditions occur, the subsequent code will not be executed, so the flow would be a lot cleaner without the nested if-else. https://github.com/OSOceanAcoustics/echoregions/blob/ae1e8c2be57c056a5c4fd182708b8185824480f9/echoregions/regions2d/regions2d.py#L132-L170
else
The same comments go with the block on depth as well: https://github.com/OSOceanAcoustics/echoregions/blob/ae1e8c2be57c056a5c4fd182708b8185824480f9/echoregions/regions2d/regions2d.py#L171-L210
The below section can be disentangled by doing all the current
else
(error) conditions first. In that case, when theelse
(error) conditions occur, the subsequent code will not be executed, so the flow would be a lot cleaner without the nested if-else. https://github.com/OSOceanAcoustics/echoregions/blob/ae1e8c2be57c056a5c4fd182708b8185824480f9/echoregions/regions2d/regions2d.py#L132-L170The same comments go with the block on depth as well: https://github.com/OSOceanAcoustics/echoregions/blob/ae1e8c2be57c056a5c4fd182708b8185824480f9/echoregions/regions2d/regions2d.py#L171-L210