Gut icon indicating copy to clipboard operation
Gut copied to clipboard

Improve static typing support

Open mphe opened this issue 3 months ago • 3 comments

I enabled various warnings in debug/gdscript related to enforcing static typing, e.g. unsafe_property_access or unsafe_method_access. I also treat some of them as errors.

I've just wrote a unit test and immediately ran into errors because Gut doesn't seem to make much use of static typing. This patch gives the gut object a class_name and adds an explicit return type to the get_elapsed_time function.

I'm not sure if GutContext is a sensible name for this class, I'm open for suggestions.

This patch just contains fixes for the parts that immediately caused errors in my workflow. There might be more PRs to come in the future if I run into trouble again :)

mphe avatar Apr 06 '24 22:04 mphe