Skip to content

Disable unused parameter warning on functions with keyword pass #13315

@Kazox61

Description

@Kazox61

Describe the project you are working on

Any

Describe the problem or limitation you are having in your project

I have this virtual function:

func _on_physics_process(delta: float) -> void:
	pass

For this i get this warning:
[Ignore]Line 16 (UNUSED_PARAMETER):The parameter "delta" is never used in the function "_on_physics_process()". If this is intended, prefix it with an underscore: "_delta".

When i use the suggestion, after auto-completing the override, i get this:

func _on_physics_process(_delta: float) -> void:

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The warning shouldn't show up when there is the keyword pass in the function body.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Instead of disabling the warning, we could also remove the _ in the override from the auto-complete.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Is there a reason why this should be core and not an add-on in the asset library?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions