mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Update ruff to 0.285 (#107519)
This updates ruff to 0.285 which is faster, better, and have fixes a bunch of false negatives with regards to fstrings. I also enabled RUF017 which looks for accidental quadratic list summation. Luckily, seems like there are no instances of it in our codebase, so enabling it so that it stays like that. :) Pull Request resolved: https://github.com/pytorch/pytorch/pull/107519 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
02c2b750c5
commit
88ab3e4322
@ -502,7 +502,7 @@ def hip_header_magic(input_string):
|
||||
|
||||
# Check if one of the following headers is already included.
|
||||
headers = ["hip/hip_runtime.h", "hip/hip_runtime_api.h"]
|
||||
if any(re.search(r'#include ("{0}"|<{0}>)'.format(ext), output_string) for ext in headers):
|
||||
if any(re.search(fr'#include ("{ext}"|<{ext}>)', output_string) for ext in headers):
|
||||
return output_string
|
||||
|
||||
# Rough logic to detect if we're inside device code
|
||||
|
Reference in New Issue
Block a user