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

Allow for auto-formatting on save when using VSCode #981

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

egibs
Copy link
Contributor

@egibs egibs commented Nov 29, 2023

Background

make fmt runs both isort and black on all files in the repository; however, it would also be nice for individual files to be formatted automatically on save. This PR updates the configuration applied by make vscode-config to include settings to run the equivalent of what make fmt runs when saving a file.

This PR also updates the README file with a link to the required VSCode extension and makes a note of the added functionality for the Make target and also adds the black and isort configuration to pyproject.toml.

Changes

  • Adds make fmt equivalents to example_settings.json
  • Updates README.md
  • Adds pyproject.toml

Testing

  • The new settings work as expected -- I tested this by running make vscode-config, installing the formatting extension, and saving a modified file with obvious formatting issues which were then resolved on save.

@egibs egibs requested review from a team November 29, 2023 18:26
@egibs egibs changed the title Allow for auto-formatting on save when using VS Code Allow for auto-formatting on save when using VSCode Nov 29, 2023
@egibs egibs merged commit fbd6e09 into main Nov 29, 2023
1 check passed
@egibs egibs deleted the egibs-apply-fmt-config branch November 29, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants