17 lines
		
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			349 B
		
	
	
	
		
			Python
		
	
	
	
	
	
|   | from pathlib import Path | ||
|  | from loguru import logger | ||
|  | 
 | ||
|  | 
 | ||
|  | def is_submodule(path): | ||
|  |     if path.is_file(): | ||
|  |         return path.suffix == ".py" and path.stem != "__init__" | ||
|  |     if path.is_dir(): | ||
|  |         return (path / "__init__.py").exists() | ||
|  |     return False | ||
|  | 
 | ||
|  | 
 | ||
|  | __all__ = [p.stem for p in Path(__file__).parent.iterdir() if is_submodule(p)] | ||
|  | 
 | ||
|  | 
 | ||
|  | logger = logger |