fix annotation regex for flake8 (#26694)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26694

Previously we would not properly populate `errorDesc` for:
```
./torch/jit/__init__.py:13:1: F401 'torch.nn.ModuleList' imported but unused
```

because we wanted only letters and spaces. Be more permissive

Test Plan: Imported from OSS

Differential Revision: D17551999

Pulled By: suo

fbshipit-source-id: b82567df1fa3c9729e7427dc3461bedfb40933dc
This commit is contained in:
Michael Suo 2019-09-24 10:57:43 -07:00 committed by facebook-github-bot
parent 3f72bcfcaa
commit c0c2921a06

View File

@ -43,6 +43,6 @@ jobs:
check_name: 'flake8-py3'
linter_output_path: 'flake8-output.txt'
commit_sha: ${{ steps.get_pr_tip.outputs.commit_sha }}
regex: '^(?<filename>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+): (?<errorCode>\w\d+) (?<errorDesc>[\s|\w]*)'
regex: '^(?<filename>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+): (?<errorCode>\w\d+) (?<errorDesc>.*)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}