Inspectopedia Help

Non-optimal list declaration

Reports cases when a list declaration can be rewritten with a list literal.

This ensures better performance of your application.

Example:

l = [1] l.append(2)

When the quick-fix is applied, the code changes to:

l = [1, 2]

Inspection Details

Available in:

DataSpell 2023.3, PyCharm 2023.3

Plugin:

Python Community Edition, 233.SNAPSHOT

Last modified: 13 July 2023