Repository navigation
Report resolved Black CLI for format, not import black - #3
Merged
Merged
Conversation
The format driver often re-execs into .bbp-project-venv while Black may still be a matching executable on PATH. import black then fails even though formatting works. After tools configure, print path, version, Black's Python/interpreter, and the format driver interpreter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
formatso it reports the resolved Black executable after tools configure, instead ofimport blackin the format driver..bbp-project-venv(PyYAML / cmake-format / etc.) while Black may still be a matching CLI onPATHoutside that venv. In that caseimport blackfails even though formatting works (Could not determine black version: No module named 'black').Related: neuronsimulator/nrn#3783, neuronsimulator/nrn#3782, #2.
Test plan
./bin/format -q <cmake file>with system Black on PATH (pyenv) — probe shows shim path + real Interpreter, no import error.bbp-project-venv— probe shows venv path/Interpreterninja format-prfrom nrn with this submodule — probe prints successfully