mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[BE] Enable ruff's UP rules and autoformat utils/ (#105424)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105424 Approved by: https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
91ab32e4b1
commit
abc1cadddb
@ -31,7 +31,7 @@ def optimize_for_mobile(
|
||||
"""
|
||||
if not isinstance(script_module, torch.jit.ScriptModule):
|
||||
raise TypeError(
|
||||
'Got {}, but ScriptModule is expected.'.format(type(script_module)))
|
||||
f'Got {type(script_module)}, but ScriptModule is expected.')
|
||||
|
||||
if optimization_blocklist is None:
|
||||
optimization_blocklist = set()
|
||||
@ -86,7 +86,7 @@ def generate_mobile_module_lints(script_module: torch.jit.ScriptModule):
|
||||
"""
|
||||
if not isinstance(script_module, torch.jit.ScriptModule):
|
||||
raise TypeError(
|
||||
'Got {}, but ScriptModule is expected.'.format(type(script_module)))
|
||||
f'Got {type(script_module)}, but ScriptModule is expected.')
|
||||
|
||||
lint_list = []
|
||||
|
||||
|
Reference in New Issue
Block a user