mirror of
https://github.com/GAM-team/GAM.git
synced 2025-05-12 12:17:20 +00:00
Add pre-commit config for formatting and linting (#1166)
Adds a pre-commit config for development that runs several fixers, including YAPF with "google" style and pylint for static analysis. Use of `requirements-dev.txt` appears to be a common pattern for this type of work: https://pypi.org/project/requirements-dev.txt/
This commit is contained in:
parent
dae5cff728
commit
f301dac442
27
.pre-commit-config.yaml
Normal file
27
.pre-commit-config.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
default_language_version:
|
||||||
|
python: python3.7
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.4.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-docstring-first
|
||||||
|
- id: name-tests-test
|
||||||
|
- id: requirements-txt-fixer
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-yapf
|
||||||
|
rev: v0.29.0
|
||||||
|
hooks:
|
||||||
|
- id: yapf
|
||||||
|
args: [--style=google, --in-place]
|
||||||
|
|
||||||
|
- repo: https://github.com/PyCQA/pylint
|
||||||
|
rev: pylint-2.4.4
|
||||||
|
hooks:
|
||||||
|
- id: pylint
|
||||||
|
args: [--output-format=colorized]
|
7
src/requirements-dev.txt
Normal file
7
src/requirements-dev.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This file contains all requirements needed for GAM development work
|
||||||
|
|
||||||
|
# Include all build requirements
|
||||||
|
-r requirements.txt
|
||||||
|
|
||||||
|
# Dev-specific requirements
|
||||||
|
pre-commit
|
@ -1,10 +1,10 @@
|
|||||||
cryptography
|
cryptography
|
||||||
python-dateutil
|
|
||||||
distro; sys_platform == 'linux'
|
distro; sys_platform == 'linux'
|
||||||
filelock
|
filelock
|
||||||
google-api-python-client>=1.7.10
|
google-api-python-client>=1.7.10
|
||||||
google-auth>=1.11.2
|
|
||||||
google-auth-httplib2
|
google-auth-httplib2
|
||||||
google-auth-oauthlib>=0.4.1
|
google-auth-oauthlib>=0.4.1
|
||||||
|
google-auth>=1.11.2
|
||||||
httplib2>=0.17.0
|
httplib2>=0.17.0
|
||||||
passlib>=1.7.2; sys_platform == 'win32'
|
passlib>=1.7.2; sys_platform == 'win32'
|
||||||
|
python-dateutil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user