I'm starting to add coyote jumps and jump buffering to my player code and Invalid operands happen

func _physics_process(delta) -> void:
was_on_the_floor = is_on_floor()

# Handle gravity.
if not is_on_floor():
	velocity.y += get_gravity() * delta  # Gravity is added to the y velocity.
	velocity.y = -1
	if was_on_the_floor and velocity.y >= 0:
		can_coyote_jump = true
		get_tree().create_timer(coyote_time).timeout.connect(func(): can_coyote_jump = false)
else:
	if jump_pressed:
		velocity.y = JUMP_VELOCITY  # Apply jump velocity
		jump_pressed = false
		jump_buffer_timer.stop()  # Stop the jump buffer timer

    IssacChoiIsAPoo Code fixing for Invalid operands 'float' and 'Vector2' in operator '+'

    Which line of code causes the error?

    The only one I see that uses '+' is this one, but it looks like all of the operands are 'float'.
    Also, this line serves no purpose, since the following line replaces the value.
    velocity.y += get_gravity() * delta

    IssacChoiIsAPoo PhysicsBody2D::get_gravity() returns Vector2. When trying to add this vector to a scalar velocity.y it will of course cause an error.