Instead of appending items to a list just after creation, it should be refactored to add those items into the list definition itself.
procArgs = []
procArgs.append('terraform-analyzer')
procArgs.append('terraform-docs')
procArgs = ['terraform-analyzer', 'terraform-docs']