Enable parsing struct meta sections#804
Conversation
|
See also prior wip #797 but this might well be more complete |
Pull Request Test Coverage Report for Build 18798570385Details
💛 - Coveralls |
|
@adamnovak Can I just ask about the couple of unrelated changes in the type hints and |
|
I was getting type-checking failures without quoting those types, and I think with |
I tested in a fresh Python 3.12 venv with:
pip install '.[dev]'
make check
And it turns out I don't need these changes (anymore?)
|
@mlin I checked again on a fresh install on Python 3.12 and mypy 1.18.2, and it looks like those typing changes aren't actually needed. So I've pulled them out. |
Motivation
This should fix #803 and also fix #760, which Toil needs fixed in order to start running tests against the WDL 1.2 spec tests.
Approach
This adds the
meta_sectionproductions as allowed peers of struct fields in the grammar for parsing structs, and handles them similarly to how they are handled when they show up inworkflowortaskblocks when building the object model from the parse tree.I have some changes to the imports and type specs in here which appeared to be needed to actually import the code on my machine; I'm not sure how the old version actually worked. I don't think I can pull them out of the branch because otherwise the files can't be imported, as far as I can tell.
Checklist
make prettyto reformat the code withruff formatmake checkto statically check the code usingruff checkandmypy