mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Revert "[BE]: Update ruff to 0.285 (#107519)"
This reverts commit 88ab3e43228b7440a33bf534cde493446a31538c. Reverted https://github.com/pytorch/pytorch/pull/107519 on behalf of https://github.com/ZainRizvi due to Sorry, but this PR breaks internal tests. @ezyang, can you please hep them get unblocked? It seems like one of the strings was prob accidentally modified ([comment](https://github.com/pytorch/pytorch/pull/107519#issuecomment-1688833480))
This commit is contained in:
@ -1611,9 +1611,11 @@ def load_inline(name,
|
||||
raise ValueError(f"Expected 'functions' to be a list or dict, but was {type(functions)}")
|
||||
for function_name, docstring in functions.items():
|
||||
if with_pytorch_error_handling:
|
||||
module_def.append(f'm.def("{function_name}", torch::wrap_pybind_function({function_name}), "{docstring}");')
|
||||
module_def.append(
|
||||
'm.def("{0}", torch::wrap_pybind_function({0}), "{1}");'
|
||||
.format(function_name, docstring))
|
||||
else:
|
||||
module_def.append(f'm.def("{function_name}", {function_name}, "{docstring}");')
|
||||
module_def.append('m.def("{0}", {0}, "{1}");'.format(function_name, docstring))
|
||||
module_def.append('}')
|
||||
cpp_sources += module_def
|
||||
|
||||
|
Reference in New Issue
Block a user