Fixed #22991 -- Prevented *.pyc files in autoreload monitoring

This fixes a regression introduced in 6d302f639.
Thanks lorinkoz at gmail.com for the report and Collin Anderson
for the initial patch.
Unnecessary list comprehension.