mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Do some cleanup in importlib:
+ Ditch using arguments to super(). + Ditch subclassing from object directly. + Move directory check out of chaining path hook to file path hook/finder. + Rename some classes to better reflect they are finders, not importers.
This commit is contained in:
		
							parent
							
								
									a2fcb1d964
								
							
						
					
					
						commit
						2dee597e05
					
				
					 8 changed files with 56 additions and 62 deletions
				
			
		|  | @ -14,7 +14,7 @@ class PathHookTests(unittest.TestCase): | |||
|     # XXX Should it only work for directories containing an extension module? | ||||
| 
 | ||||
|     def hook(self, entry): | ||||
|         return importlib.ExtensionFileImporter(entry) | ||||
|         return importlib.ExtensionFileFinder(entry) | ||||
| 
 | ||||
|     def test_success(self): | ||||
|         # Path hook should handle a directory where a known extension module | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon