mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	hooks/pre-commit: enable pydocstyle, if installed
This commit is contained in:
		
							parent
							
								
									d7214a7f1c
								
							
						
					
					
						commit
						a692cd9d72
					
				
					 2 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -94,6 +94,7 @@ find_command() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
DASH=$(find_command dash)
 | 
			
		||||
PYDOCSTYLE=$(find_command pydocstyle)
 | 
			
		||||
PYFLAKES=$(find_command pyflakes)
 | 
			
		||||
PEP8=$(find_command pycodestyle pep8)
 | 
			
		||||
RUBY=$(find_command ruby)
 | 
			
		||||
| 
						 | 
				
			
			@ -103,6 +104,9 @@ if [ "$PY_FILES $PY_TEST_FILES" != " " ]; then
 | 
			
		|||
    if ! $PYFLAKES $PY_FILES $PY_TEST_FILES; then
 | 
			
		||||
	err "pyflakes tests failed!"
 | 
			
		||||
    fi
 | 
			
		||||
    if ! $PYDOCSTYLE $PY_FILES $PY_TEST_FILES; then
 | 
			
		||||
	err "pydocstyle tests failed!"
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$PY_FILES" != "" ]; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								setup.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -10,15 +10,15 @@ from setuptools.command.install import install
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class VersionCheckCommand(Command):
 | 
			
		||||
    """Make sure git tag and version match before uploading"""
 | 
			
		||||
    """Make sure git tag and version match before uploading."""
 | 
			
		||||
 | 
			
		||||
    user_options = []
 | 
			
		||||
 | 
			
		||||
    def initialize_options(self):
 | 
			
		||||
        """Abstract method that is required to be overwritten"""
 | 
			
		||||
        """Abstract method that is required to be overwritten."""
 | 
			
		||||
 | 
			
		||||
    def finalize_options(self):
 | 
			
		||||
        """Abstract method that is required to be overwritten"""
 | 
			
		||||
        """Abstract method that is required to be overwritten."""
 | 
			
		||||
 | 
			
		||||
    def run(self):
 | 
			
		||||
        version = self.distribution.get_version()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue