Connect parent bone tail to child head
First, you have to switch to the object mode.

In a python console, enter something like this. Make sure to change the name of the armature to what you have. The .tail property is not what you want to overwrite, it's the tail_local.

for bone in bpy.data.armatures['Armature'].bones:
    if bone.parent is not None:
        bone.parent.tail_local = bone.head_local


Then switch to edit mode to see the effect



If your parents can have multiple children and if you only want to move those tails that have a single children, you can try to use this code snippet:

parent2children = {}

for bone in bpy.data.armatures['Armature'].bones:
    if bone.parent is not None:
        if bone.parent.name in parent2children:
            parent2children[bone.parent.name].append(bone)
        else:
            parent2children[bone.parent.name] = [bone]


for name in parent2children:
    if len(parent2children[name]) == 1:
        parent = bpy.data.armatures['Armature'].bones[name]
        parent.tail_local = parent2children[name][0].head_local


make sure to switch to object mode first here as well