From a34671a6a7b069e1ad0a75215919bc380993917b Mon Sep 17 00:00:00 2001 From: Tom Lancaster Date: Wed, 8 May 2024 14:21:15 +0100 Subject: [PATCH] Modifying yara-python docs to reflect existence of strict_escape bool --- docs/yarapython.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/yarapython.rst b/docs/yarapython.rst index 55ba62a0e8..c40a5cb8af 100644 --- a/docs/yarapython.rst +++ b/docs/yarapython.rst @@ -119,12 +119,15 @@ should pass the ``externals`` parameter to the ``compile`` method. For example: The ``externals`` parameter must be a dictionary with the names of the variables as keys and an associated value of either string, integer or boolean type. -The ``compile`` method also accepts the optional boolean argument +The ``compile`` method also accepts the optional boolean arguments telling yara-python +how to deal with warnings. The first argument of this nature is ``error_on_warning``. This arguments tells YARA to raise an exception when a warning is issued during compilation. Such warnings are typically issued when your rules contains some construct that could be slowing down the scanning. -The default value for the ``error_on_warning`` argument is False. - +The default value for the ``error_on_warning`` argument is False. The second argument of +this type is another boolean, ``strict_escape``, when enabled this causes YARA to treat +mis-escaped characters as errors. The default value for the ``strict_escape`` argument is +False. In all cases ``compile`` returns an instance of the class :py:class:`yara.Rules` Rules. This class has a ``save`` method that can be used to save the compiled