pytorch/torchgen/api
Xuehai Pan c73a92fbf5 [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546)
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
2025-02-27 20:46:16 +00:00
..
types [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
__init__.py
autograd.py [1/N] Apply py39 ruff fixes (#138578) 2024-12-02 21:46:18 +00:00
cpp.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
dispatcher.py [1/N] Apply py39 ruff fixes (#138578) 2024-12-02 21:46:18 +00:00
functionalization.py Revert "Make functionalization ViewMeta serializable with pickle. (#143712)" 2025-01-17 00:52:50 +00:00
lazy.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
meta.py [BE][Easy] eliminate relative import in torchgen (#128872) 2024-06-21 14:11:46 +00:00
native.py [1/N] Apply py39 ruff fixes (#138578) 2024-12-02 21:46:18 +00:00
python.py [BE][CI] bump ruff to 0.9.0: string quote styles (#144569) 2025-02-24 19:56:09 +00:00
structured.py [Reland] [Torchgen] Pass mutable to cpp.valuetype_type (#134549) 2024-09-01 15:15:38 +00:00
translate.py [1/N] Apply py39 ruff fixes (#138578) 2024-12-02 21:46:18 +00:00
ufunc.py [BE][Easy] enable postponed annotations in torchgen (#129376) 2024-06-29 09:23:39 +00:00
unboxing.py [BE] Format .ci/ / .github/ / benchmarks/ / functorch/ / tools/ / torchgen/ with ruff format (#132577) 2024-10-11 18:30:26 +00:00