Skip to content

Commit

Permalink
Update asserts.py documentation (#1036)
Browse files Browse the repository at this point in the history
it's been a while Python does not produce anymore .pyo files (see https://docs.python.org/3/using/cmdline.html#cmdoption-O)
  • Loading branch information
deronnax committed Jul 12, 2023
1 parent db6d677 commit a0d5fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bandit/plugins/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
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.
However, assert is removed with compiling to optimised byte code (`python -O`
producing \*.opt-1.pyc files). This caused various protections to be removed.
Consider raising a semantically meaningful error or ``AssertionError`` instead.
Please see
Expand Down

0 comments on commit a0d5fc6

Please sign in to comment.