From b4b87cbfcd49a22459d991d39b527bf6c5bbf389 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 1 Nov 2024 12:22:58 -0500 Subject: [PATCH] Superficially type the parser --- pymbolic/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pymbolic/parser.py b/pymbolic/parser.py index 4384db0f..6171d660 100644 --- a/pymbolic/parser.py +++ b/pymbolic/parser.py @@ -1,5 +1,7 @@ from __future__ import annotations +from pymbolic.typing import ExpressionT + __copyright__ = "Copyright (C) 2009-2013 Andreas Kloeckner" @@ -559,7 +561,7 @@ def parse_arglist(self, pstate): comma_allowed = True - def __call__(self, expr_str, min_precedence=0): + def __call__(self, expr_str: str, min_precedence: int = 0) -> ExpressionT: lex_result = [(tag, s, idx, match_obj) for (tag, s, idx, match_obj) in pytools.lex.lex( self.lex_table, expr_str,