This makes the result types consistent in matcher helpers in parse.py, defines a generic MatchResult[…] type, and annotates the functions there.
This is sufficient to pass mypy --strict greenery/parse{,_test}.py.
One change was required in rxelems, to avoid untyped-call errors due to missing annotations on the Conc and Pattern constructors: that change is also included effectively in #89 and should merge cleanly.
This makes the result types consistent in matcher helpers in
parse.py
, defines a genericMatchResult[…]
type, and annotates the functions there.This is sufficient to pass
mypy --strict greenery/parse{,_test}.py
.One change was required in
rxelems
, to avoiduntyped-call
errors due to missing annotations on theConc
andPattern
constructors: that change is also included effectively in #89 and should merge cleanly.