benchmark
19fc1702 - bump `ruff` to 0.9.2: multiline `assert` statements (#144546)

Commit
296 days ago
bump `ruff` to 0.9.2: multiline `assert` statements (#144546) Summary: Reference: https://docs.astral.sh/ruff/formatter/black/#assert-statements > Unlike Black, Ruff prefers breaking the message over breaking the assertion, similar to how both Ruff and Black prefer breaking the assignment value over breaking the assignment target: > > ```python > # Input > assert ( > len(policy_types) >= priority + num_duplicates > ), f"This tests needs at least {priority+num_duplicates} many types." > > > # Black > assert ( > len(policy_types) >= priority + num_duplicates > ), f"This tests needs at least {priority+num_duplicates} many types." > > # Ruff > assert len(policy_types) >= priority + num_duplicates, ( > f"This tests needs at least {priority + num_duplicates} many types." > ) > ``` X-link: https://github.com/pytorch/pytorch/pull/144546 Approved by: https://github.com/malfet Reviewed By: wdvr Differential Revision: D70347844 fbshipit-source-id: 353e475b7af872793d26888e8fd35f76464d6af3
Author
generatedunixname499836121
Parents
Loading