mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
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." > ) > ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/144546 Approved by: https://github.com/malfet |
||
|---|---|---|
| .. | ||
| operator_inp_logs | ||
| __init__.py | ||
| analyze_templates.py | ||
| bench_mm_fusion.py | ||
| benchmark_helper.py | ||
| cache_debug_microbenchmarks.py | ||
| cache_hit_microbenchmarks.py | ||
| dynamo_guard_eval.py | ||
| dynamo_microbenchmarks.py | ||
| fx_microbenchmarks.py | ||
| inductor_bmm.py | ||
| inductor_cpu_atomic.py | ||
| inductor_mm.py | ||
| matmul_relu.py | ||
| microbench.py | ||
| model.py | ||
| operator_inp_utils.py | ||
| operatorbench.py | ||
| overheads.py | ||
| tensor_layout_mini_benchmark.py | ||
| utils.py | ||