Building dev-python/flask with USE=doc requires dev-python/sphinxcontrib-log_cabinet and dev-python/sphinx-tabs. The build fails if these packages are not installed, so they should be made dependencies in the ebuild.
Fixed with version 2.0.1-r1 in the following commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e4d854fd8c165fae29e59c02dcfa76c751a4488
Sorry, also fixed with this commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49d0750307ebbce63fd32ad0c0580c71bf22461a