Skip to content

Conversation

@AdminCrystal
Copy link

No description provided.

@AdminCrystal
Copy link
Author

As mentioned in our other pull request I have made this one as just the return types for public methods, I avoided any @deprecated @ignore or ones prefixed with _ for this pr.
I tried to put specific return types where possible, theoretically some of the ones I labeled as Variant could be specified as Node instead but not sure if that would break something
Some could be improved such as compare_deep instead of returning Variant it could return the CompareResult but since its not an actual class its not possible to do that with current set up

I did run the tests before and after my changes but I have failures even on main branch pre my changes, they haven't changed counts but I thought I should mention before you think about merging

Godot v4.5.stable - macOS Sequoia (15.6.1) - Multi-window, 1 monitor - Metal (Forward+) - integrated Apple M4 Pro (Apple9) - Apple M4 Pro (12 threads) - 24.00 GiB memory
Screenshot 2025-10-02 at 8 10 03 PM

@AdminCrystal AdminCrystal marked this pull request as ready for review October 3, 2025 01:10
@AdminCrystal AdminCrystal mentioned this pull request Oct 3, 2025
@bitwes
Copy link
Owner

bitwes commented Oct 6, 2025

Please post your failing tests. My prediction is that they are input related.

Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments for some methods that I think can be more specific than Variant but we would have to run the tests to be sure.



func get_call_parameters(variant, method_name, index=-1):
func get_call_parameters(variant, method_name, index=-1) -> Variant:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array, optionally Array[Variant], I'm fine with either, we just have to be consistent.

## Peforms a deep compare on both values, a CompareResult instnace is returned.
## The optional max_differences paramter sets the max_differences to be displayed.
func compare_deep(v1, v2, max_differences=null):
func compare_deep(v1, v2, max_differences=null) -> Variant:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array

## Create a Double of [param thing]. [param thing] should be a Class, script,
## or scene. See [wiki]Doubles[/wiki]
func double(thing, double_strat=null, not_used_anymore=null):
func double(thing, double_strat=null, not_used_anymore=null) -> Variant:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be Object I think. Unless you can't return null for Object, then it has to remain Variant. I always forget where I can/can't use null when something has a type. I think primitives are the only thing that can't be null.

## Create a Partial Double of [param thing]. [param thing] should be a Class,
## script, or scene. See [wiki]Partial-Doubles[/wiki]
func partial_double(thing, double_strat=null, not_used_anymore=null):
func partial_double(thing, double_strat=null, not_used_anymore=null) -> Variant:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as double

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants