mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	There shouldn't be any blank lines after the function docstring. Remove the blank lines to fix this issue. Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			685 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			685 B
		
	
	
	
		
			Python
		
	
	
	
	
	
"""Main entry point for the documentation build process"""
 | 
						|
 | 
						|
import os
 | 
						|
 | 
						|
 | 
						|
def define_env(env):
 | 
						|
    """Define custom environment variables for the documentation build process"""
 | 
						|
 | 
						|
    @env.macro
 | 
						|
    def listimages(subdir):
 | 
						|
        """Return a listing of all asset files in the provided subdir"""
 | 
						|
        here = os.path.dirname(__file__)
 | 
						|
 | 
						|
        directory = os.path.join(here, 'docs', 'assets', 'images', subdir)
 | 
						|
 | 
						|
        assets = []
 | 
						|
 | 
						|
        allowed = [
 | 
						|
            '.png',
 | 
						|
            '.jpg',
 | 
						|
        ]
 | 
						|
 | 
						|
        for asset in os.listdir(directory):
 | 
						|
 | 
						|
            if any(asset.endswith(x) for x in allowed):
 | 
						|
                assets.append(os.path.join(subdir, asset))
 | 
						|
 | 
						|
        return assets
 |