mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 21:49:24 +08:00
[BE][Ez]: Use interned hardcoded string FURB156 (#138330)
Uses string constants from string module. Pull Request resolved: https://github.com/pytorch/pytorch/pull/138330 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
9c2a80322a
commit
195d0a666b
@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import string
|
||||
from collections import defaultdict
|
||||
from typing import Sequence
|
||||
|
||||
@ -194,9 +195,7 @@ def generate_out_args_from_schema(
|
||||
lambda a: [] if a.annotation is None else a.annotation.alias_set,
|
||||
func.arguments.flat_all,
|
||||
)
|
||||
valid_annotations = [
|
||||
x for x in "abcdefghijklmnopqrstuvwxyz" if x not in used_annotations
|
||||
]
|
||||
valid_annotations = [x for x in string.ascii_lowercase if x not in used_annotations]
|
||||
|
||||
all_rets_are_tensors = all(r.type == BaseType(BaseTy.Tensor) for r in func.returns)
|
||||
|
||||
|
Reference in New Issue
Block a user