You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question is, what do we need to change in unpythonic to support these? At least:
DONE in 58388fc: lazify and autocurry should not recurse into ast.TypeAlias, because lazifying or autocurrying a type declaration makes no sense.
DONE in 040e333: Anything that touches on exception handling in the macro layer needs to detect TryStar as well as Try.
Not much detects Try; just autoreturn and scopeanalyzer.
DONE in faab516: Anything that detects binding forms needs to detect captures in match/case.
It seems unpythonic/syntax/scopeanalyzer.py is the only such part. But this is used in the let constructs (including do) as well as in lazify, so fixing that should be enough.
Bindings from the type statement are handled automatically by the old machinery, because they are names in Store context.
Anything else I'm missing?
The text was updated successfully, but these errors were encountered:
Since the parts I'm aware of are now done, but there may still be something I've missed, I'm keeping this ticket open, but moving it to the 0.15.4 milestone.
There have been some recent changes to the Python AST:
match
/case
(pattern matching, now a native Python feature)try
/except*
(exception groups)type
statement (type alias)Full details in official docs.
Question is, what do we need to change in
unpythonic
to support these? At least:lazify
andautocurry
should not recurse intoast.TypeAlias
, because lazifying or autocurrying a type declaration makes no sense.TryStar
as well asTry
.Try
; justautoreturn
and scopeanalyzer.match
/case
.unpythonic/syntax/scopeanalyzer.py
is the only such part. But this is used in thelet
constructs (includingdo
) as well as inlazify
, so fixing that should be enough.type
statement are handled automatically by the old machinery, because they are names inStore
context.Anything else I'm missing?
The text was updated successfully, but these errors were encountered: