mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	pre-commit: pep8 is now pycodestyle
See https://github.com/PyCQA/pycodestyle/issues/466.
This commit is contained in:
		
							parent
							
								
									d8a8c24584
								
							
						
					
					
						commit
						b53e56916c
					
				
					 1 changed files with 10 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -72,20 +72,21 @@ cmd_exists() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
find_command() {
 | 
			
		||||
	local name=$1
 | 
			
		||||
	for suff in "3" "-python3" ""; do
 | 
			
		||||
		cmd=${1}${suff}
 | 
			
		||||
		if cmd_exists $cmd; then
 | 
			
		||||
			echo $cmd
 | 
			
		||||
			return 0
 | 
			
		||||
		fi
 | 
			
		||||
	for name in $@; do
 | 
			
		||||
		for suff in "3" "-python3" ""; do
 | 
			
		||||
			cmd=${name}${suff}
 | 
			
		||||
			if cmd_exists $cmd; then
 | 
			
		||||
				echo $cmd
 | 
			
		||||
				return 0
 | 
			
		||||
			fi
 | 
			
		||||
		done
 | 
			
		||||
	done
 | 
			
		||||
	warn "$1 is not installed, using dummy placeholder!"
 | 
			
		||||
	echo -n :
 | 
			
		||||
	echo :
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PYFLAKES=$(find_command pyflakes)
 | 
			
		||||
PEP8=$(find_command pep8)
 | 
			
		||||
PEP8=$(find_command pycodestyle pep8)
 | 
			
		||||
 | 
			
		||||
if [ "$PY_FILES $PY_TEST_FILES" != " " ]; then
 | 
			
		||||
    if ! $PYFLAKES $PY_FILES $PY_TEST_FILES; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue