mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Use snake_case
This commit is contained in:
		
							parent
							
								
									82d942c3d8
								
							
						
					
					
						commit
						a0fda60662
					
				|  | @ -2615,14 +2615,14 @@ def open(fp, mode="r"): | ||||||
| 
 | 
 | ||||||
|     preinit() |     preinit() | ||||||
| 
 | 
 | ||||||
|     acceptWarnings = [] |     accept_warnings = [] | ||||||
|     def _open_core(fp, filename, prefix): |     def _open_core(fp, filename, prefix): | ||||||
|         for i in ID: |         for i in ID: | ||||||
|             try: |             try: | ||||||
|                 factory, accept = OPEN[i] |                 factory, accept = OPEN[i] | ||||||
|                 result = not accept or accept(prefix) |                 result = not accept or accept(prefix) | ||||||
|                 if type(result) in [str, bytes]: |                 if type(result) in [str, bytes]: | ||||||
|                     acceptWarnings.append(result) |                     accept_warnings.append(result) | ||||||
|                 elif result: |                 elif result: | ||||||
|                     fp.seek(0) |                     fp.seek(0) | ||||||
|                     im = factory(fp, filename) |                     im = factory(fp, filename) | ||||||
|  | @ -2647,7 +2647,7 @@ def open(fp, mode="r"): | ||||||
| 
 | 
 | ||||||
|     if exclusive_fp: |     if exclusive_fp: | ||||||
|         fp.close() |         fp.close() | ||||||
|     for message in acceptWarnings: |     for message in accept_warnings: | ||||||
|         warnings.warn(message) |         warnings.warn(message) | ||||||
|     raise IOError("cannot identify image file %r" |     raise IOError("cannot identify image file %r" | ||||||
|                   % (filename if filename else fp)) |                   % (filename if filename else fp)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user