mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-11-04 07:54:03 +00:00 
			
		
		
		
	Run isort import sorter during package build
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
This commit is contained in:
		
							parent
							
								
									4e27045f49
								
							
						
					
					
						commit
						a685368ae9
					
				
							
								
								
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@ -15,6 +15,7 @@ Build-Depends:
 | 
				
			|||||||
 dh-python,
 | 
					 dh-python,
 | 
				
			||||||
 distro-info (>= 0.2~),
 | 
					 distro-info (>= 0.2~),
 | 
				
			||||||
 flake8,
 | 
					 flake8,
 | 
				
			||||||
 | 
					 isort <!nocheck>,
 | 
				
			||||||
 lsb-release,
 | 
					 lsb-release,
 | 
				
			||||||
 python3-all,
 | 
					 python3-all,
 | 
				
			||||||
 python3-apt,
 | 
					 python3-apt,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,2 +1,6 @@
 | 
				
			|||||||
[tool.black]
 | 
					[tool.black]
 | 
				
			||||||
line-length = 99
 | 
					line-length = 99
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[tool.isort]
 | 
				
			||||||
 | 
					line_length = 99
 | 
				
			||||||
 | 
					profile = "black"
 | 
				
			||||||
 | 
				
			|||||||
@ -9,5 +9,8 @@ PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
 | 
				
			|||||||
echo "Running black..."
 | 
					echo "Running black..."
 | 
				
			||||||
black --check --diff . $PYTHON_SCRIPTS
 | 
					black --check --diff . $PYTHON_SCRIPTS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Running isort..."
 | 
				
			||||||
 | 
					isort --check-only --diff .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Running flake8..."
 | 
					echo "Running flake8..."
 | 
				
			||||||
flake8 --max-line-length=99 --ignore=E203,W503 . $PYTHON_SCRIPTS
 | 
					flake8 --max-line-length=99 --ignore=E203,W503 . $PYTHON_SCRIPTS
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user