My preference is to use names that match normalization rules, i.e. dashes. Then you avoid the confusion when you type pip install foo_bar
but get foo-bar
instead.
Though I am biased because per Gentoo policy dashes are strongly preferred to underscores, so if you use underscores (or dots, which aren’t allowed in Gentoo at all), I have to end up using different downstream and upstream package name.