This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
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.
Here are the changes:
Reformat code to make it pass under python3.8
Currently the
# nosec
directives don't work for multi-line strings in python3.8 (issue reported here PyCQA/bandit#658)In order for it to work, the
# nosec
directive has to be placed on the first line of the expression, which is impossible for multi-line strings. Therefore the affected multi-line strings were converted to single-line strings.Rename
.bandit
to.bandit.yml
The bandit configuration files seem to be a mess. According to the documentation on PyPI one can place a
.bandit
file into the working directory. In the example they provide it's an INI-style file. However bandit doesn't seem to read this file, contrary to what is written in the documentation.Additionally, bandit has the
-c
command line option, that allows the specification of a configuration file. This is the way we configure bandit in ourtox.ini
. However, this file is a YAML-style config file, see here. Therefore I added the.yml
extnesion to make this clear.Pinned the
bandit
version intox.ini
Seems like a good practise, just to avoid differences between run on different machines.