Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more code formatters #124

Open
nijel opened this issue May 17, 2019 · 2 comments
Open

Add support for more code formatters #124

nijel opened this issue May 17, 2019 · 2 comments

Comments

@nijel
Copy link
Contributor

nijel commented May 17, 2019

There is currently support for pep8ify, but it would be useful to support other tools in this way:

@alimcmaster1
Copy link

@OrkoHunter - what would it take to support black? Mind outlining what would be involved? I might be interested in working on this.

Thanks,

Ali

@OrkoHunter
Copy link
Collaborator

@alimcmaster1 Thank you so much for your interest! Let me post an overview about how this can be implemented.

  • User commends pep8ify on a Pull Request and the server receives the call here which calles pep8speaks.hanndlers._pep8ify.
  • Here it forks the repository, creates a new branch, makes a commit and creates a pull request. It runs autopep8 by default. For this change, the formatter can be obtained from the .pep8speaks.yml config. So, let us say if scanner.formatter is set to black, then it can use black to format the code. If that key is not present in the config, then it can continue with the default autopep8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants