Make patterns in test_unmatched_annotations more flexible (#36422)
Summary:
To make them compatible with python3.7 and python3.8
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36422
Test Plan: CI
Differential Revision: D21006399
Pulled By: malfet
fbshipit-source-id: 725df277ff3e4479fc2c39d16a30fbf301fde9e5