mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	#7092: Fix additional "-3" warnings in the idlelib package, and convert to absolute imports.
This commit is contained in:
		
							parent
							
								
									f28dd0d1bf
								
							
						
					
					
						commit
						d630c04ab1
					
				
					 37 changed files with 169 additions and 149 deletions
				
			
		|  | @ -7,12 +7,7 @@ | |||
| import sys | ||||
| import string | ||||
| 
 | ||||
| from configHandler import idleConf | ||||
| 
 | ||||
| import AutoCompleteWindow | ||||
| from HyperParser import HyperParser | ||||
| 
 | ||||
| import __main__ | ||||
| from idlelib.configHandler import idleConf | ||||
| 
 | ||||
| # This string includes all chars that may be in a file name (without a path | ||||
| # separator) | ||||
|  | @ -23,6 +18,11 @@ | |||
| # These constants represent the two different types of completions | ||||
| COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1) | ||||
| 
 | ||||
| from idlelib import AutoCompleteWindow | ||||
| from idlelib.HyperParser import HyperParser | ||||
| 
 | ||||
| import __main__ | ||||
| 
 | ||||
| SEPS = os.sep | ||||
| if os.altsep:  # e.g. '/' on Windows... | ||||
|     SEPS += os.altsep | ||||
|  | @ -193,7 +193,7 @@ def fetch_completions(self, what, mode): | |||
|                         smalll = eval("__all__", namespace) | ||||
|                         smalll.sort() | ||||
|                     else: | ||||
|                         smalll = filter(lambda s: s[:1] != '_', bigl) | ||||
|                         smalll = [s for s in bigl if s[:1] != '_'] | ||||
|                 else: | ||||
|                     try: | ||||
|                         entity = self.get_entity(what) | ||||
|  | @ -203,7 +203,7 @@ def fetch_completions(self, what, mode): | |||
|                             smalll = entity.__all__ | ||||
|                             smalll.sort() | ||||
|                         else: | ||||
|                             smalll = filter(lambda s: s[:1] != '_', bigl) | ||||
|                             smalll = [s for s in bigl if s[:1] != '_'] | ||||
|                     except: | ||||
|                         return [], [] | ||||
| 
 | ||||
|  | @ -214,7 +214,7 @@ def fetch_completions(self, what, mode): | |||
|                     expandedpath = os.path.expanduser(what) | ||||
|                     bigl = os.listdir(expandedpath) | ||||
|                     bigl.sort() | ||||
|                     smalll = filter(lambda s: s[:1] != '.', bigl) | ||||
|                     smalll = [s for s in bigl if s[:1] != '.'] | ||||
|                 except OSError: | ||||
|                     return [], [] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Florent Xicluna
						Florent Xicluna