mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Simplified code
This commit is contained in:
		
							parent
							
								
									a118a82c30
								
							
						
					
					
						commit
						152a24e13a
					
				| 
						 | 
					@ -3240,10 +3240,8 @@ def open(fp, mode="r", formats=None) -> Image:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    exclusive_fp = False
 | 
					    exclusive_fp = False
 | 
				
			||||||
    filename = ""
 | 
					    filename = ""
 | 
				
			||||||
    if isinstance(fp, os.PathLike):
 | 
					    if is_path(fp):
 | 
				
			||||||
        filename = os.path.realpath(os.fspath(fp))
 | 
					        filename = os.path.realpath(os.fspath(fp))
 | 
				
			||||||
    elif is_path(fp):
 | 
					 | 
				
			||||||
        filename = fp
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if filename:
 | 
					    if filename:
 | 
				
			||||||
        fp = builtins.open(filename, "rb")
 | 
					        fp = builtins.open(filename, "rb")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user