The black linter step is using v19 instead of v20, as can be seen in this line of the Pipfile.lock file. Solution might be to pin the version to at least version 20, or to pin it to v20 to avoid unplanned breaking changes.
https://github.com/github/super-linter/blob/6902cbfd3d6ca9432bcfa450ff91a3f6ca2472e1/dependencies/Pipfile.lock#L67
Same issue as here: https://github.com/github/super-linter/issues/722
What about enforcing a minimum version in the Pipfile?
->
black = ">=20"
Failing for me as well, also using 20.8b1
@jeremiahlewis-vw Can you pin the version in the pip file so this stops happening? I think that should be a good fix for now and will get you 1 PR closer to hacktoberfest :)
Would love to contribute, but unfortunately can't do a PR, for reasons. Anyone else down for the PR?
This was merged and fixed!
Apparently still relevant:
$ docker run --entrypoint /usr/bin/env --rm github/super-linter:latest black --version
black, version 19.10b0
Edit: snakefmt==0.2.3 requires black >=19.10b0,<20.0
Just checked as well, it's still the old version in Pipfile.lock. Probably need to upgrade the dependencies...
Unfortunately the underlying problem seems to be conflicting dependencies. As per my previous comment:
Edit:
snakefmt==0.2.3requiresblack >=19.10b0,<20.0
And just to be clear, what is the issue with black 19? why we can't keep it in the version compatible with snakefmt?
They don't produce identical output, thus causing the relevant CI check to fail if there is a version mismatch between the dev and the CI environments.
Would it be somehow possible to overcome this by passing a flag to the super linter?
For example either:
FORCE_LATEST, that would take a list of name, and use the latest version for this toolFORCE_LATEST_X, that would force the latest version of the toolFORCE_LATEST might lead to conflicts between tools, but the user can prevent this by running the tools in separate steps, ex:
steps:
- name: Black
uses: docker://github/super-linter:v3
if: always()
env:
# Run only black
VALIDATE_PYTHON_BLACK: true
FORCE_LATEST_BLACK: true
- name: Lint everything else
uses: docker://github/super-linter:v3
if: always()
env:
# run everything except black
VALIDATE_PYTHON_BLACK: false
It seems that we only have this conflict with skanefmt/black at the moment, but I won't be surprised if similar issues arise with the addition of other linters.
We could instead have a FORCE_VERSION_X, but I am not sure how difficult it would be to track which versions are supported by the super linter.
Imho a simpler solution would be to install each tool in an isolated environment (whenever possible).
Most helpful comment
Imho a simpler solution would be to install each tool in an isolated environment (whenever possible).