How to update armature data after transform?

First I thought that transform armature data via python not work for unclear reasons. Then I found that it work but it not update itself until I do some origin transform manually.

data.update() not exist for armature object, data.bones. has attribute update() but it do nothing.
Any ideas how to push it to work?

Edit: I mean in Object mode. Going in/out to edit mode will update data, but this is: 1. a bit dumb “update method” 2. what if I don’t want to go in to edit mode.

rig = bpy.data.objects[‘my armature’]
rig.bones[0].location = rig.bones[0].location

This is silly but it’s the only way I’ve found.