Derived from the refurb linter.
Fix is always available.
This rule is unstable and in preview. The
--preview flag is required for use.
What it does#
Checks for uses of
set.remove that can be replaced with
Why is this bad?#
If an element should be removed from a set if it is present, it is more
succinct and idiomatic to use
This rule is prone to false negatives due to type inference limitations, as it will only detect sets that are instantiated as literals or annotated with a type annotation.