if ...: is now treated as if True: and it therefore thought tons of the eval_files contained unreachable statements. Replaced it with an arbitrary function call.
fix pyright errors
ignored error about Statement being unhashable, which it technically should be, although I guess we're inheriting a __hash__ from NamedTuple and it currently works :tm:. Need to change a bunch of equality checks in the code to make it less illegal, so leaving that for now.
TRIO910 "non-empty async function must contain checkpoint" did not properly detect
async def foo(): ...
as an empty function, since it was matching against the indented body. This is now the black style, which is why I found it. So fixed that, and updated test file to have both.
There's only a few more instances of IndentedBlock in the project, and none seem problematic, but it's possible this could be a problem in other places.
I can split this across multiple PRs, but idk if it's warranted. Now that we moved and can set up pre-commit it should be more incremental going forward.
if ...:
is now treated asif True:
and it therefore thought tons of theeval_files
contained unreachable statements. Replaced it with an arbitrary function call.Statement
being unhashable, which it technically should be, although I guess we're inheriting a__hash__
fromNamedTuple
and it currently works :tm:. Need to change a bunch of equality checks in the code to make it less illegal, so leaving that for now.as an empty function, since it was matching against the indented body. This is now the black style, which is why I found it. So fixed that, and updated test file to have both. There's only a few more instances of
IndentedBlock
in the project, and none seem problematic, but it's possible this could be a problem in other places.I can split this across multiple PRs, but idk if it's warranted. Now that we moved and can set up pre-commit it should be more incremental going forward.