mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[BE][CI] bump ruff
to 0.9.0: string quote styles (#144569)
Reference: https://docs.astral.sh/ruff/formatter/#f-string-formatting - Change the outer quotes to double quotes for nested f-strings ```diff - f'{", ".join(args)}' + f"{', '.join(args)}" ``` - Change the inner quotes to double quotes for triple f-strings ```diff string = """ - {', '.join(args)} + {", ".join(args)} """ ``` - Join implicitly concatenated strings ```diff - string = "short string " "short string " f"{var}" + string = f"short string short string {var}" ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/144569 Approved by: https://github.com/Skylion007 ghstack dependencies: #146509
This commit is contained in:
committed by
PyTorch MergeBot
parent
52f6d4aa30
commit
754fb834db
@ -108,7 +108,7 @@ def failures_histogram(eager_dir, dynamo_dir, verbose=False, format_issues=False
|
||||
def as_issue(count, msg, repro, tests):
|
||||
tests = "\n".join(tests)
|
||||
result = f"""
|
||||
{'-' * 50}
|
||||
{"-" * 50}
|
||||
{count} Dynamo test are failing with \"{msg}\".
|
||||
|
||||
## Repro
|
||||
|
@ -145,7 +145,7 @@ Labels: {features.labels}
|
||||
|
||||
Current category: {commit.category}
|
||||
|
||||
Select from: {', '.join(common.categories)}
|
||||
Select from: {", ".join(common.categories)}
|
||||
|
||||
"""
|
||||
)
|
||||
@ -165,7 +165,7 @@ Select from: {', '.join(common.categories)}
|
||||
cat_choice = choices[0]
|
||||
print(f"\nSelected: {cat_choice}")
|
||||
print(f"\nCurrent topic: {commit.topic}")
|
||||
print(f"""Select from: {', '.join(topics)}""")
|
||||
print(f"""Select from: {", ".join(topics)}""")
|
||||
topic_choice = None
|
||||
while topic_choice is None:
|
||||
value = input("topic> ").strip()
|
||||
|
Reference in New Issue
Block a user