flatten indentation where it makes sense
This commit is contained in:
parent
9d5b1ef5e6
commit
39d9b88fa4
2 changed files with 22 additions and 25 deletions
|
|
@ -12,7 +12,7 @@ def annotation2key(aaa: int | float | str) -> tuple[bool, Any]:
|
|||
def annotations_lt(aa: annotations_t, bb: annotations_t) -> bool:
|
||||
if aa is None:
|
||||
return bb is not None
|
||||
elif bb is None:
|
||||
elif bb is None: # noqa: RET505
|
||||
return False
|
||||
|
||||
if len(aa) != len(bb):
|
||||
|
|
@ -38,7 +38,7 @@ def annotations_lt(aa: annotations_t, bb: annotations_t) -> bool:
|
|||
def annotations_eq(aa: annotations_t, bb: annotations_t) -> bool:
|
||||
if aa is None:
|
||||
return bb is None
|
||||
elif bb is None:
|
||||
elif bb is None: # noqa: RET505
|
||||
return False
|
||||
|
||||
if len(aa) != len(bb):
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ def maxrects_bssf(
|
|||
if allow_rejects:
|
||||
rejected_inds.add(rect_ind)
|
||||
continue
|
||||
else:
|
||||
raise MasqueError(f'Failed to find a suitable location for rectangle {rect_ind}')
|
||||
raise MasqueError(f'Failed to find a suitable location for rectangle {rect_ind}')
|
||||
|
||||
# Read out location
|
||||
loc = regions[rr, :2]
|
||||
|
|
@ -161,8 +160,7 @@ def guillotine_bssf_sas(
|
|||
if allow_rejects:
|
||||
rejected_inds.add(rect_ind)
|
||||
continue
|
||||
else:
|
||||
raise MasqueError(f'Failed to find a suitable location for rectangle {rect_ind}')
|
||||
raise MasqueError(f'Failed to find a suitable location for rectangle {rect_ind}')
|
||||
|
||||
# Read out location
|
||||
loc = regions[rr, :2]
|
||||
|
|
|
|||
Loading…
Reference in a new issue