Closed DanielNoord closed 2 years ago
Documenting this in the
readme
sounds good, however it might be useful to add a skip to the fixture too, so that:
A skip or a warning? With a skip they would always skip 10+ test.
- some of the tests that don't rely on this option will still work.
pytest
automatically runs those still I believe. For me the test suite only broke on about 10/15 tests. The rest passed.
Both work, as long as there is some indication that the tests are failing because of an old version of git.
Does anybody know what this linting error is? I saw a lot of subprocess
calls where the git
command is set up in a string before the actual call. I thought this was because of line lengths, but I'm now thinking that this is a way to avoid this linting warning. Is that correct? And if so, doesn't it make sense to just turn it off?
It's because the git
command is being found in PATH
instead of being "fully qualified relative to the filesystem root".
https://bandit.readthedocs.io/en/1.7.4/plugins/b607_start_process_with_partial_path.html
Perhaps this can be skipped because it's in a test and not production code?
It's because the
git
command is being found inPATH
instead of being "fully qualified relative to the filesystem root".https://bandit.readthedocs.io/en/1.7.4/plugins/b607_start_process_with_partial_path.html
Perhaps this can be skipped because it's in a test and not production code?
The current trick of just initialising a variable and using the variable doesn't really solve the issue that bandit
is warning for though, right? Might as well disable it for this file.
I don't know, you can try it!
Rather than skipping the whole file, we can skip just this check for just this line with # nosec B607
I don't know, you can try it!
Rather than skipping the whole file, we can skip just this check for just this line with
# nosec B607
Please see https://github.com/python/cherry-picker/pull/71/.
Passes bandit
locally for me!
CI fixed 😄
git init --initial-branch
was only added in2.28
. It's being used in one of the fixtures so this should probably be documented.See: https://git-scm.com/docs/git-init/2.28.0