pytorch
74268789 - Exclude test/generated_type_hints_smoketest.py from flake8 (#50497)

Commit
3 years ago
Exclude test/generated_type_hints_smoketest.py from flake8 (#50497) Summary: Similar to https://github.com/pytorch/pytorch/issues/48201, this PR excludes a file that is auto-generated by [`test/test_type_hints.py`](https://github.com/pytorch/pytorch/blob/5834438090a1b3206347e30968e48f44251a53a1/test/test_type_hints.py#L109-L111), which doesn't happen to be run before the Flake8 check is done in CI. Also, because the `exclude` list in `.flake8` has gotten fairly long, this PR splits it across multiple lines. Pull Request resolved: https://github.com/pytorch/pytorch/pull/50497 Test Plan: Run this in your shell: ```sh python test/test_type_hints.py TestTypeHints.test_doc_examples flake8 ``` - _Before:_ `flake8` prints [these 169 false positives](https://pastebin.com/qPJY24g8) and returns exit code 1 - _After:_ `flake8` prints no output and returns exit code 0 Reviewed By: mrshenli Differential Revision: D25903177 Pulled By: samestep fbshipit-source-id: 21f757ac8bfa626bb56ece2ecc55668912b71234
Author
Parents
Loading