mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] f-stringify torch/ and scripts (#105538)
This PR is a follow up on the pyupgrade series to convert more strings to use f-strings using `flynt`. - https://docs.python.org/3/reference/lexical_analysis.html#f-strings - https://pypi.org/project/flynt/ Command used: ``` flynt torch/ -ll 120 flynt scripts/ -ll 120 flynt tools/ -ll 120 ``` and excluded `collect_env.py` Pull Request resolved: https://github.com/pytorch/pytorch/pull/105538 Approved by: https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
4c73016ff2
commit
4cc1745b13
@ -61,9 +61,7 @@ class GenOperatorsYAMLTest(unittest.TestCase):
|
||||
filtered_configs = list(filter(filter_func, config))
|
||||
assert (
|
||||
len(filtered_configs) == 2
|
||||
), "Expected 2 elements in filtered_configs, but got {}".format(
|
||||
len(filtered_configs)
|
||||
)
|
||||
), f"Expected 2 elements in filtered_configs, but got {len(filtered_configs)}"
|
||||
|
||||
def test_verification_success(self):
|
||||
filter_func = make_filter_from_options(
|
||||
|
Reference in New Issue
Block a user