functional: refactor common types utils into separate module#666
functional: refactor common types utils into separate module#666tehrengruber wants to merge 4 commits intoGridTools:functionalfrom
Conversation
egparedes
left a comment
There was a problem hiding this comment.
Since these functions fully depend on the common_types module, I think it would make more sense to just add them there instead of creating a new separate module.
|
Alright, changed. I had placed them into separate models to only have types in common_types, but that's not a strict requirement. Shall we just ignore the mypy errors? They will eventually disappear anyway. |
Maybe add the files to the ignore list in the pre-commit settings for mypy. When the next mypy release comes out in a couple of weeks, we can remove all files from the ignore list. |
|
You need to rebase/merge the new |
|
I tried just to recognize that we apparently both missed that @DropD did almost the same change in #654. Well the utils landed in a new file |
The utilities in the FOAST type deduction are independent of the FOAST and only require the symbol types in
ffront.common_types. This PR refactors them into a separate module so that I can use them in thePASTtype deduction.Note that the mypy version that we are currently using does not support pythons
matchstatement used in the code. As such mypy fails and according to python/mypy#11829 there doesn't seem to be a way to suppress the warning. Support is expected to land in the next release 0.940 and is already on master: python/mypy#10191