Skip to content

Commit

Permalink
skip PTC-W0063 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Sep 21, 2024
1 parent d97a449 commit b75cdb9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package/PartSegCore/analysis/measurement_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def get_global_parameters(self):
res = [name]
iterator = iter(self._data_dict.keys())
with suppress(StopIteration):
next(iterator) # skipcq: PTC-W0063`
next(iterator) # skipcq: PTC-W0063
else:
res = []
iterator = iter(self._data_dict.keys())
Expand All @@ -233,7 +233,7 @@ def _prepare_res_iterator(self, counts):
res = [[name] for _ in range(counts)]
iterator = iter(self._data_dict.keys())
with suppress(StopIteration):
next(iterator) # skipcq: PTC-W0063`
next(iterator) # skipcq: PTC-W0063
else:
res = [[] for _ in range(counts)]
iterator = iter(self._data_dict.keys())
Expand Down
8 changes: 6 additions & 2 deletions package/PartSegImage/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ def _adjust_channel_info(
res.append(
ChannelInfoFull(
name=ch_inf.name or f"channel {i+1}",
color_map=ch_inf.color_map if ch_inf.color_map is not None else next(default_colors),
color_map=(
ch_inf.color_map if ch_inf.color_map is not None else next(default_colors) # skipcq: PTC-W0063
),
contrast_limits=(
ch_inf.contrast_limits
if ch_inf.contrast_limits is not None
Expand All @@ -280,7 +282,9 @@ def _adjust_channel_info(
for i, arr in enumerate(channel_array[len(res) :], start=len(channel_info)):
res.append(
ChannelInfoFull(
name=f"channel {i+1}", color_map=next(default_colors), contrast_limits=(np.min(arr), np.max(arr))
name=f"channel {i+1}",
color_map=next(default_colors), # skipcq: PTC-W0063
contrast_limits=(np.min(arr), np.max(arr)),
)
)

Expand Down

0 comments on commit b75cdb9

Please sign in to comment.