Skip to content

Commit

Permalink
Make flake8-bandit work with latest bandit 1.7.3 version
Browse files Browse the repository at this point in the history
Fixes tylerwince#21

flake8-bandit 1.7.3 (PyCQA/bandit#496)
introduced an `fdata` argument and this just passes a `None` to make
things work with the latest version of bandit.
  • Loading branch information
nastra committed Mar 1, 2022
1 parent 00ba2e4 commit 0153473
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions flake8_bandit.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,13 @@ def _check_source(self):
return []

bnv = BanditNodeVisitor(
self.filename,
BanditMetaAst(),
BanditTestSet(BanditConfig(), profile=config.profile),
False,
[],
Metrics(),
fname=self.filename,
fdata=None,
metaast=BanditMetaAst(),
testset=BanditTestSet(BanditConfig(), profile=config.profile),
debug=False,
nosec_lines=[],
metrics=Metrics(),
)
bnv.generic_visit(self.tree)
return [
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_version(fname="flake8_bandit.py"):
VERSION = get_version()

# What packages are required for this module to be executed?
REQUIRED = ["flake8", "bandit", "flake8-polyfill", "pycodestyle"]
REQUIRED = ["flake8", "bandit=>1.7.3", "flake8-polyfill", "pycodestyle"]

# What packages are optional?
EXTRAS = {
Expand Down

0 comments on commit 0153473

Please sign in to comment.