Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to fix a Python linting problem where sometimes the isort step in the git pre-commit hook disagrees with the isort step in the CI workflow. This is really painful because it's basically isort fighting with itself.
The root cause of the problem is that isort's import grouping is based on what imports it considers to be first party, which in turn is influenced by how it is invoked (the complete list of files or folders that are passed to it on the command line). The pre-commit hook and CI workflow weren't processing the same file/folder list. So that's fixed.
In the process, I also figured out how to get isort to consider all Python imports found within the astrobee repo as first party, which makes the import grouping more inline with the normal isort convention (and PEP 8). That triggered a one-time change where a bunch of Python files now have their imports following this consistent style.