mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
[BE] Fix all B022 useless-contextlib-suppress
(#100335)
No arguments passed to contextlib.suppress. No exceptions will be suppressed and therefore this context manager is redundant Pull Request resolved: https://github.com/pytorch/pytorch/pull/100335 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
d7bdfd3454
commit
01abbfbaae
@ -916,7 +916,7 @@ def _get_should_profile():
|
||||
|
||||
|
||||
def _enable_rpc_profiler(should_profile, qualified_name, func, rpc_type, dst_worker_info):
|
||||
ctx_manager = contextlib.suppress()
|
||||
ctx_manager = contextlib.nullcontext()
|
||||
|
||||
if should_profile:
|
||||
# Create appropriate string representation based on type of func
|
||||
|
Reference in New Issue
Block a user