pytorch/tools/test
Tom Ritchford d90f9e9a34 [inductor] Fix issue with set_linter, improve linter framework (#144620)
### `set_linter` only

* Fix gnarly [bug](dbed747aae/tools/test/set_linter_testdata/python_code.py.txt.python (L42)) which would have garbled Python files involving sets contained in sets.
* Better handling of new Python3.12 token types

### Both linters.

* Recover from and report on unparseable Python files
* Remove `ParseError.check()` (it made it harder to read the code)
* FileLinter is now generic on `PythonFile`

### Notes

As I started working on new docstring features, I found a nasty bug and an edge case bug in set linter, and realized both the linters crash when there is a badly-formed Python file in the repo.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/144620
Approved by: https://github.com/amjames, https://github.com/jansel
2025-03-13 09:49:40 +00:00
..
docstring_linter_testdata Enable ruff's unused variable checking everywhere in pytorch (#136965) 2024-12-22 02:33:11 +00:00
heuristics Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
set_linter_testdata [inductor] Fix issue with set_linter, improve linter framework (#144620) 2025-03-13 09:49:40 +00:00
gen_operators_yaml_test.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
gen_oplist_test.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
linter_test_case.py [inductor] Fix issue with set_linter, improve linter framework (#144620) 2025-03-13 09:49:40 +00:00
test_cmake.py Simplify handling of max jobs in CMake builds (#145820) 2025-01-31 00:55:39 +00:00
test_codegen_model.py [torchgen] Add support for schema with namespace (#148038) 2025-02-28 16:41:50 +00:00
test_codegen.py Generate op variants for core CIA ops (#141797) 2024-12-03 22:57:46 +00:00
test_create_alerts.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
test_docstring_linter.py docstring_linter finds long classes and functions without docstrings (#140426) 2024-12-08 17:03:57 +00:00
test_executorch_custom_ops.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
test_executorch_gen.py torchgen: support exception boundary for ExecuTorch functions (#144341) 2025-01-31 01:05:21 +00:00
test_executorch_signatures.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
test_executorch_types.py [ET] codegen: bool array as array ref (#134886) 2024-09-01 01:33:43 +00:00
test_executorch_unboxing.py
test_gen_backend_stubs.py [BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374) 2024-12-29 17:23:13 +00:00
test_selective_build.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
test_set_linter.py [inductor] Fix issue with set_linter, improve linter framework (#144620) 2025-03-13 09:49:40 +00:00
test_test_run.py Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
test_test_selections.py Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
test_upload_stats_lib.py Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
test_upload_test_stats.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00
test_utils.py
test_vulkan_codegen.py [BE][Easy] enable postponed annotations in tools (#129375) 2024-06-29 09:23:35 +00:00