... 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.
Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Severity: Low Confidence: High
Location: dhis2.py/dhis2/api.py:176
More Info: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
175 password = section["password"]
176 assert all([baseurl, username, password])
177 except (KeyError, AssertionError):
minor bug: Remove assertion statement: