Draft
Conversation
Zeckie
commented
Oct 18, 2020
Comment on lines
+71
to
+73
| //TODO: get black location from config? | ||
| black.blackExecutableLocation = System.getenv("LOCALAPPDATA") | ||
| + "\\Programs\\Python\\Python37\\Scripts\\black.exe"; |
Contributor
Author
There was a problem hiding this comment.
Not sure the best way to get black executable when running unit tests
Owner
There was a problem hiding this comment.
This should be based on something from org.python.pydev.core.TestDependent.
The values there are computed when TestDependent is imported.
You can create a file custom for your machine by setting the environment variable "PYDEV_TEST_PLATFORM" to some value -- say: zeckie -- and then create a TestDependent.zeckie.properties file based on the values of one of the existing templates there.
Ideally it should be a new entry there with a default value computed based on the TestDependent.PYTHON_INSTALL (to do that, change the static{} block on TestDependent to fill the value if it wasn't loaded).
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.
Black usually formats pyi files (stubs) differently to how it formats py files. However, due to the way Pydev calls Black, it currently treats both file formats the same.
Update to pass the --pyi switch to Black when formatting a pyi file.
#Hacktoberfest