doc: Fix code markup in widget.py