Python

Python

Made by DeepSource

Appending to list immediately following its definition PY-W0070

Anti-pattern
Major
Autofix

Instead of appending items to a list just after creation, it should be refactored to add those items into the list definition itself.

Bad practice

procArgs = []
procArgs.append('terraform-analyzer')
procArgs.append('terraform-docs')

Recommended

procArgs = ['terraform-analyzer', 'terraform-docs']