Release: Autopep8 transformer

Today, we are happy to announce the release of a new Transformer – “Autopep8”.

As you might already know, auotpep8 automatically formats Python code to conform to the PEP 8 style guide.

Now, coupled with Transformers, you can transform all incoming code using autopep8 – Every time a new PR is raised, we’ll check if it conforms with autopep8 style output. If it does, yay! If it doesn’t, no sweat – we run it for you, and commit back the results to the original PR.

How to enable it?

Just add the following to your .deepsource.toml, and we’ll take care of the rest:

name = "autopep8"
enabled = true

Missed our post on Transformers? Here’s a summary:

A DeepSource Transformer automatically ‘transforms’ all incoming source code in a repository with popular code auto-formatters (for e.g., black , gofmt , etc.).

For all repositories which have at least one transformer enabled in config, if:

  • A Pull/Merge Request is raised with the default branch as base, a transforming commit is added to that branch.
  • A commit is created on the default branch, DeepSource raises a Pull/Merge Request with transforming changes.

Release notes: Transformers: Automatically format all incoming code

1 Like