A bunch of stuff (namely pytest) still depends on python2-scandir in F31 Rawhide...I just got a bunch of emails about broken package dependencies for: python-wxpython4 python-suds python-pytest-xdist python-pytest-forked python-pytest-timeout I think you need to put python2-scandir back in for F31 for now. You should probably just remove that logic so this doesn't happen again in F32 when we're still trying to get rid of python2.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.