Add common email related characters to DEFAULT_TOKEN_FORMAT

This will fix the failing integration test.
This commit is contained in:
davelopez
2021-04-06 11:17:55 +02:00
parent 847db78aa1
commit 3a03ff470d
+2 -2
View File
@@ -29,7 +29,7 @@ ParserElement.enablePackrat()
# Defines the allowed characters that form a valid token.
# Tokens that don't match this format will raise an exception when found.
DEFAULT_TOKEN_FORMAT = alphanums + "_"
DEFAULT_TOKEN_FORMAT = alphanums + "_-@."
TRUE = Keyword("True")
FALSE = Keyword("False")
@@ -125,7 +125,7 @@ class BooleanExpressionEvaluator:
:param evaluator: The custom TokenEvaluator used to transform any token into a boolean.
:type evaluator: TokenEvaluator
:param token_format: A string of all allowed characters used to form a valid token, defaults to None.
The default value (None) will use DEFAULT_TOKEN_FORMAT which means the allowed characters are [A-Za-z0-9_].
The default value (None) will use DEFAULT_TOKEN_FORMAT which means the allowed characters are [A-Za-z0-9_-@.].
:type token_format: Optional[str]
"""
action = BoolOperand