Function call can be replaced with set literal
Reports calls to the set
function that can be replaced with the set
literal.
Example:
def do_mult(a, b):
c = a * b
return set([c, a, b])
When the quick-fix is applied, the code changes to:
def do_mult(a, b):
c = a * b
return {c, a, b}
Inspection Details | |
---|---|
Available in: | DataSpell 2023.3, PyCharm 2023.3 |
Plugin: | Python Community Edition, 233.SNAPSHOT |
Last modified: 13 July 2023