Remove black while support is maintained for python 2.7 #873
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.
What does this PR do?
Remove the black tox command.
Force the mypy tox env to one that is supported.
Description of the Change
Python 2.7 support is being retired in a number of the utilities we're using to perform code verification. Black, a python formatter, is currently unsafe to run for python < 3.3 and therefore the ability to do so is being disabled while python 2.7 is still under support for this repo.
MyPy is currently version locked to support 2.7 static analysis, and fails to run successfully on python > 3.8. As such, it is defaulted to 3.8, the latest stable version that, at the time of writing, also boasts the most extensive pipeline support for the repo.
Alternate Designs
Possible Drawbacks
We want a formatter for the project, so disabling black is not the solution we ultimately wish to run with. While it might be possible to isolate a specific older version of black that 1) won't break support for 2.7 and 2) won't recommend unideal format changes for 3.12, such a solution would be brittle and increasingly unlikely to work as new python versions get released. We've already disabled the black run in the pipeline and don't seem to be running it locally, so a total removal was judged as more sensible while support for 2.7 remains.
Verification Process
None, no code changed.
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.