Skip to content

Commit

Permalink
no-branch on _draw_from_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Jan 31, 2024
1 parent c9eaf6c commit bce60d5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ def _draw_from_cache(self, ir_type, kwargs, *, key, random):
# This number is chosen to balance memory/speed vs randomness. Ideally
# we would sample uniformly from all not-yet-rejected children, but
# computing and storing said children is not free.
if len(children) < 100:
# no-branch because coverage of the fall-through case here is a bit
# annoying.
if len(children) < 100: # pragma: no branch
for v in generator:
if v in rejected:
continue
Expand Down

0 comments on commit bce60d5

Please sign in to comment.