mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Use unpacking
This commit is contained in:
		
							parent
							
								
									a370209fea
								
							
						
					
					
						commit
						ed82f4d235
					
				| 
						 | 
				
			
			@ -308,7 +308,7 @@ def unsafe_eval(
 | 
			
		|||
 | 
			
		||||
    # build execution namespace
 | 
			
		||||
    args: dict[str, Any] = ops.copy()
 | 
			
		||||
    for k in list(options.keys()) + list(kw.keys()):
 | 
			
		||||
    for k in [*options, *kw]:
 | 
			
		||||
        if "__" in k or hasattr(builtins, k):
 | 
			
		||||
            msg = f"'{k}' not allowed"
 | 
			
		||||
            raise ValueError(msg)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,7 +44,7 @@ class McIdasImageFile(ImageFile.ImageFile):
 | 
			
		|||
            raise SyntaxError(msg)
 | 
			
		||||
 | 
			
		||||
        self.area_descriptor_raw = s
 | 
			
		||||
        self.area_descriptor = w = [0] + list(struct.unpack("!64i", s))
 | 
			
		||||
        self.area_descriptor = w = [0, *struct.unpack("!64i", s)]
 | 
			
		||||
 | 
			
		||||
        # get mode
 | 
			
		||||
        if w[11] == 1:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user