mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Summary: Generally wildcard imports are bad for the reasons described here: https://www.flake8rules.com/rules/F403.html This PR replaces wildcard imports with an explicit list of imported items where possible, and adds a `# noqa: F403` comment in the other cases (mostly re-exports in `__init__.py` files). This is a prerequisite for https://github.com/pytorch/pytorch/issues/55816, because currently [`tools/codegen/dest/register_dispatch_key.py` simply fails if you sort its imports](https://github.com/pytorch/pytorch/actions/runs/742505908). Pull Request resolved: https://github.com/pytorch/pytorch/pull/55838 Test Plan: CI. You can also run `flake8` locally. Reviewed By: jbschlosser Differential Revision: D27724232 Pulled By: samestep fbshipit-source-id: 269fb09cb4168f8a51fd65bfaacc6cda7fb87c34
10 lines
247 B
Python
10 lines
247 B
Python
import sys
|
|
sys.argv.append("--jit_executor=legacy")
|
|
from test_jit import * # noqa: F403
|
|
|
|
if __name__ == '__main__':
|
|
run_tests()
|
|
import test_jit_py3
|
|
suite = unittest.findTestCases(test_jit_py3)
|
|
unittest.TextTestRunner().run(suite)
|