From d0f25985afe7eeedfce36cd2bd9d586c2c279f87 Mon Sep 17 00:00:00 2001 From: Erez Sh Date: Thu, 15 Jul 2021 22:18:26 +0300 Subject: [PATCH] Fixup: change typehint to Sequence --- lark/exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lark/exceptions.py b/lark/exceptions.py index 6f7d32d..76db0fc 100644 --- a/lark/exceptions.py +++ b/lark/exceptions.py @@ -1,3 +1,5 @@ +from collections.abc import Sequence + from .utils import logger, NO_VALUE @@ -12,7 +14,7 @@ class ConfigurationError(LarkError, ValueError): pass -def assert_config(value, options: list, msg='Got %r, expected one of %s'): +def assert_config(value, options: Sequence, msg='Got %r, expected one of %s'): if value not in options: raise ConfigurationError(msg % (value, options))