filter_warnings#
- filter_warnings(arg: bool) None#
Don’t write warnings to the console when scanning files.
Usage#
.pyt:import canary canary.directives.filter_warnings(arg)
.vvt:#VVT: filter_warnings : python_expressionParameters#
arg: IfTrue, the test will be skipped.
.vvt Parameters#
python_expression: String that is evaluated and cast to abool. If the result isTruewarnings at file scanning time will be filtered.
Examples#
import sys import canary canary.directives.filter_warnings(True)
#VVT: filter_warnings : trueEvaluation namespace#
python_expressionis evaluated in a minimal namespace consisting of theosmodule,sysmodule, andimportablefunction.