mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Remove useless lambdas (#113602)
Applies PLW0108 which removes useless lambda calls in Python, the rule is in preview so it is not ready to be enabled by default just yet. These are the autofixes from the rule. Pull Request resolved: https://github.com/pytorch/pytorch/pull/113602 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
2a8a7425be
commit
b7b2178204
@ -405,7 +405,7 @@ def create_python_bindings(
|
||||
|
||||
grouped = group_filter_overloads(pairs, pred)
|
||||
|
||||
for name in sorted(grouped.keys(), key=lambda x: str(x)):
|
||||
for name in sorted(grouped.keys(), key=str):
|
||||
overloads = grouped[name]
|
||||
py_methods.append(
|
||||
method_impl(name, module, overloads, method=method, symint=symint)
|
||||
@ -443,7 +443,7 @@ def create_python_return_type_bindings(
|
||||
|
||||
grouped = group_filter_overloads(pairs, pred)
|
||||
|
||||
for name in sorted(grouped.keys(), key=lambda x: str(x)):
|
||||
for name in sorted(grouped.keys(), key=str):
|
||||
overloads = grouped[name]
|
||||
definitions, registrations = generate_return_type_definition_and_registrations(
|
||||
overloads
|
||||
@ -481,7 +481,7 @@ def create_python_return_type_bindings_header(
|
||||
|
||||
grouped = group_filter_overloads(pairs, pred)
|
||||
|
||||
for name in sorted(grouped.keys(), key=lambda x: str(x)):
|
||||
for name in sorted(grouped.keys(), key=str):
|
||||
overloads = grouped[name]
|
||||
declarations = generate_return_type_declarations(overloads)
|
||||
py_return_types_declarations.append(
|
||||
|
Reference in New Issue
Block a user