Skip to content

Conversation

@mshafer-NI
Copy link
Collaborator

We want a format command.

This format command supports:

  • no args (formats)
  • --diff prints the diff it would do
  • --check sys.exits if changes would be made

To accomplish this:

  • switch entirely to using isort and removing our own import sorting implementation.
  • bring in better-diff to make output that adds on top of the standard unified diff (notably, highlights changes in trailing whitespace or lines)

Note: to make the output of running nps format --diff consistent, calls to black had -q added to "1 file formatted" output (will also impact fix).

@mshafer-NI mshafer-NI requested review from irwand and neilvana as code owners May 6, 2025 18:13
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2025

Thank you for contributing! 👋

@mshafer-NI mshafer-NI force-pushed the dev/make_format_command branch from 005a488 to bd42241 Compare May 6, 2025 19:16
@mshafer-NI mshafer-NI merged commit 49c7dce into ni:main May 6, 2025
19 checks passed
@mshafer-NI mshafer-NI deleted the dev/make_format_command branch May 6, 2025 19:19
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.

2 participants