From c79702682814434c22ad2350c071449feb391c84 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 12 Aug 2023 11:58:16 -0600 Subject: [PATCH] chg: Remove bandit B101 ignore. --- bandit.yaml | 3 --- textology/widgets/_list_view.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/bandit.yaml b/bandit.yaml index f28c867..6a909cf 100644 --- a/bandit.yaml +++ b/bandit.yaml @@ -9,6 +9,3 @@ exclude_dirs: targets: - textology - examples - -skips: - - B101 \ No newline at end of file diff --git a/textology/widgets/_list_view.py b/textology/widgets/_list_view.py index 2bef9d4..178744d 100644 --- a/textology/widgets/_list_view.py +++ b/textology/widgets/_list_view.py @@ -117,13 +117,11 @@ def watch_index(self, old_index: int, new_index: int) -> None: """ if self._is_valid_index(old_index): old_child = self._nodes[old_index] - assert isinstance(old_child, ListItem) old_child.highlighted = False new_child: Widget | None if self._is_valid_index(new_index): new_child = self._nodes[new_index] - assert isinstance(new_child, ListItem) if isinstance(new_child, ListItemHeader): if new_index == 0: if old_index == 0 or not self._nodes: