Skip to content

Commit

Permalink
Give some tips on how to resolve B101 in the doc (PyCQA#616)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Brown <ericwb@users.noreply.github.com>
  • Loading branch information
2 people authored and mikespallino committed Jan 7, 2022
1 parent bcc3a42 commit 20e4796
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bandit/plugins/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
This plugin test checks for the use of the Python ``assert`` keyword. It was
discovered that some projects used assert to enforce interface constraints.
However, assert is removed with compiling to optimised byte code (python -o
producing \*.pyo files). This caused various protections to be removed. The use
of assert is also considered as general bad practice in OpenStack codebases.
producing \*.pyo files). This caused various protections to be removed.
Consider raising a semantically meaningful error or ``AssertionError`` instead.
Please see
https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement for
more info on ``assert``
more info on ``assert``.
**Config Options:**
Expand Down

0 comments on commit 20e4796

Please sign in to comment.