Skip to content

Commit

Permalink
[flake8-bugbear] Document explicitly disabling strict zip (B905) (#…
Browse files Browse the repository at this point in the history
…11040)

Occasionally you intentionally have iterables of differing lengths. The
rule permits this by explicitly adding `strict=False`, but this was not
documented.

## Summary

The rule does not currently document how to avoid it when having
differing length iterables is intentional. This PR adds that to the rule
documentation.
  • Loading branch information
jfrost-mo authored Apr 19, 2024
1 parent fdbcb62 commit 7b3c92a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ use crate::fix::edits::add_argument;
/// iterable. This can lead to subtle bugs.
///
/// Use the `strict` parameter to raise a `ValueError` if the iterables are of
/// non-uniform length.
/// non-uniform length. If the iterables are intentionally different lengths, the
/// parameter should be explicitly set to `False`.
///
/// ## Example
/// ```python
Expand Down

0 comments on commit 7b3c92a

Please sign in to comment.