mirror of
				https://github.com/pytorch/pytorch.git
				synced 2025-11-04 16:04:58 +08:00 
			
		
		
		
	[BE]: pyupgrade Python to 3.8 - imports and object inheritance only (#94308)
Apply parts of pyupgrade to torch (starting with the safest changes). This PR only does two things: removes the need to inherit from object and removes unused future imports. Pull Request resolved: https://github.com/pytorch/pytorch/pull/94308 Approved by: https://github.com/ezyang, https://github.com/albanD
This commit is contained in:
		
				
					committed by
					
						
						PyTorch MergeBot
					
				
			
			
				
	
			
			
			
						parent
						
							567e6152da
						
					
				
				
					commit
					8fce9a09cd
				
			@ -607,7 +607,7 @@ class KeyErrorMessage(str):
 | 
			
		||||
        return self
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ExceptionWrapper(object):
 | 
			
		||||
class ExceptionWrapper:
 | 
			
		||||
    r"""Wraps an exception plus traceback to communicate across threads"""
 | 
			
		||||
 | 
			
		||||
    def __init__(self, exc_info=None, where="in background"):
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user