mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[BE] Enable C419 rule for any all shortcircuiting (#99890)
Apparently https://github.com/pytorch/pytorch/pull/78142 made torch.JIT allow for simple generator expressions which allows us to enable rules that replace unnecessary list comprehensions with generators in any/all. This was originally part of #99280 but I split it off into this PR so that it can be easily reverted should anything break. Pull Request resolved: https://github.com/pytorch/pytorch/pull/99890 Approved by: https://github.com/justinchuby, https://github.com/kit1980, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
e43918b93a
commit
e2a3817dfd
@ -57,7 +57,7 @@ def is_intrested_file(
|
||||
file_path: str, interested_folders: List[str], platform: TestPlatform
|
||||
) -> bool:
|
||||
ignored_patterns = ["cuda", "aten/gen_aten", "aten/aten_", "build/"]
|
||||
if any([pattern in file_path for pattern in ignored_patterns]):
|
||||
if any(pattern in file_path for pattern in ignored_patterns):
|
||||
return False
|
||||
|
||||
# ignore files that are not belong to pytorch
|
||||
|
Reference in New Issue
Block a user