unnecessary-empty-iterable-within-deque-call (RUF037)
Preview (since 0.9.0) · Related issues · View source
Fix is sometimes available.
This rule is unstable and in preview. The --preview flag is required for use.
What it does
Checks for usages of collections.deque that have an empty iterable as the first argument.
Why is this bad?
It's unnecessary to use an empty literal as a deque's iterable, since this is already the default behavior.
Example
Use instead:
Fix safety
The fix is marked as unsafe whenever it would delete comments present in the deque call or if
there are unrecognized arguments other than iterable and maxlen.
Fix availability
This rule's fix is unavailable if any starred arguments are present after the initial iterable.