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

Format code using black and add pre-commit hooks #137

Merged
merged 3 commits into from
Jun 18, 2018

Conversation

ljvmiranda921
Copy link
Owner

@ljvmiranda921 ljvmiranda921 commented Jun 16, 2018

Description

Reformat code using black and ensure that it also passes flake8. Added configuration for both black and flake8 (.flake8 and pyproject.toml). Update CONTRIBUTING guide and mention black.

Related Issue

#139

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ljvmiranda921 ljvmiranda921 added the admin System-related and potential overrides label Jun 16, 2018
@ljvmiranda921 ljvmiranda921 changed the title Format code using black Format code using black and add pre-commit hooks Jun 18, 2018
ljvmiranda921 added 2 commits June 18, 2018 19:55
This commit formats the majority of pyswarms code using the
black formatter. This will be our new formatter from this point
forward.

Signed-off-by: Lester James V. Miranda <[email protected]>
This commit adds the .flake8 and pyproject.toml to specify flake8
and black configuration. In addition, we updated the code to reflect
the warnings found in flake8.

Signed-off-by: Lester James V. Miranda <[email protected]>
In this commit, we explicitly say that we are using black as our
code formatter.

Signed-off-by: Lester James V. Miranda <[email protected]>
@ljvmiranda921 ljvmiranda921 self-assigned this Jun 18, 2018
@ljvmiranda921 ljvmiranda921 merged commit f59e73c into development Jun 18, 2018
@ljvmiranda921 ljvmiranda921 deleted the format-code branch June 18, 2018 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin System-related and potential overrides
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant