aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.flake84
-rw-r--r--.pre-commit-config.yaml13
-rw-r--r--Pipfile5
-rw-r--r--Pipfile.lock71
4 files changed, 86 insertions, 7 deletions
diff --git a/.flake8 b/.flake8
index e2face09..2e469fe2 100644
--- a/.flake8
+++ b/.flake8
@@ -4,11 +4,11 @@ ignore=
# Missing Docstrings
D100,D104,D107,
# Docstring Whitespace
- D202,D203,D204,D212,D214,D215,
+ D203,D212,D214,D215,
# Docstring Quotes
D301,D302,
# Docstring Content
- D400,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414
+ D400,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413, D414
per-file-ignores =
**/tests/**:D101,D102,D103,D105,D106,S106
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..28a51465
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,13 @@
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.2.3
+ hooks:
+ - id: flake8
+ additional_dependencies: [
+ "flake8-bandit",
+ "flake8-bugbear",
+ "flake8-docstrings",
+ "flake8-import-order ",
+ "flake8-string-format",
+ "flake8-tidy-imports"
+ ] \ No newline at end of file
diff --git a/Pipfile b/Pipfile
index 036f079c..6d76831b 100644
--- a/Pipfile
+++ b/Pipfile
@@ -7,6 +7,7 @@ verify_ssl = true
flake8 = "~=3.7.7"
flake8-bandit = "==1.0.2"
flake8-bugbear = "~=19.3.0"
+flake8-docstrings = "~=1.3.0"
flake8-import-order = "~=0.18.1"
flake8-string-format = "~=0.2.3"
flake8-tidy-imports = "~=2.0.0"
@@ -14,8 +15,8 @@ mccabe = "~=0.6.1"
pep8-naming = "~=0.8.2"
coverage = "~=4.5.3"
unittest-xml-reporting = "~=2.5.1"
-flake8-docstrings = "~=1.3.0"
pydocstyle = "==3.0.0"
+pre-commit = "~=1.17.0"
[packages]
django = "~=2.2"
@@ -41,3 +42,5 @@ python_version = "3.7"
makemigrations = "python manage.py makemigrations"
django_shell = "python manage.py shell"
test = "python manage.py test"
+lint = "flake8 pydis_site"
+precommit = "pre-commit install"
diff --git a/Pipfile.lock b/Pipfile.lock
index b40b06c1..963dccab 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "2f1eaa80a71489a59f71001ad4af39e8e570f8d7ebca33b475d2c530811ad084"
+ "sha256": "bfe5ac803d58497ad94fa877fcb502f96176167924d8c3ebfcc73aa463e468fd"
},
"pipfile-spec": 6,
"requires": {
@@ -237,6 +237,13 @@
}
},
"develop": {
+ "aspy.yaml": {
+ "hashes": [
+ "sha256:463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc",
+ "sha256:e7c742382eff2caed61f87a39d13f99109088e5e93f04d76eb8d4b28aa143f45"
+ ],
+ "version": "==1.3.0"
+ },
"attrs": {
"hashes": [
"sha256:69c0dbf2ed392de1cb5ec704444b08a5ef81680a61cb899dc08127123af36a79",
@@ -251,6 +258,13 @@
],
"version": "==1.6.2"
},
+ "cfgv": {
+ "hashes": [
+ "sha256:32edbe09de6f4521224b87822103a8c16a614d31a894735f7a5b3bcf0eb3c37e",
+ "sha256:3bd31385cd2bebddbba8012200aaf15aa208539f1b33973759b4d02fc2148da5"
+ ],
+ "version": "==2.0.0"
+ },
"coverage": {
"hashes": [
"sha256:3684fabf6b87a369017756b551cef29e505cb155ddb892a7a29277b978da88b9",
@@ -297,11 +311,11 @@
},
"flake8": {
"hashes": [
- "sha256:859996073f341f2670741b51ec1e67a01da142831aa1fdc6242dbf88dffbe661",
- "sha256:a796a115208f5c03b18f332f7c11729812c8c3ded6c46319c59b53efd3819da8"
+ "sha256:19241c1cbc971b9962473e4438a2ca19749a7dd002dd1a946eaba171b4114548",
+ "sha256:8e9dfa3cecb2400b3738a42c54c3043e821682b9c840b0448c0503f781130696"
],
"index": "pypi",
- "version": "==3.7.7"
+ "version": "==3.7.8"
},
"flake8-bandit": {
"hashes": [
@@ -372,6 +386,20 @@
],
"version": "==2.1.11"
},
+ "identify": {
+ "hashes": [
+ "sha256:0a11379b46d06529795442742a043dc2fa14cd8c995ae81d1febbc5f1c014c87",
+ "sha256:43a5d24ffdb07bc7e21faf68b08e9f526a1f41f0056073f480291539ef961dfd"
+ ],
+ "version": "==1.4.5"
+ },
+ "importlib-metadata": {
+ "hashes": [
+ "sha256:6dfd58dfe281e8d240937776065dd3624ad5469c835248219bd16cf2e12dbeb7",
+ "sha256:cb6ee23b46173539939964df59d3d72c3e0c1b5d54b84f1d8a7e912fe43612db"
+ ],
+ "version": "==0.18"
+ },
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
@@ -380,6 +408,12 @@
"index": "pypi",
"version": "==0.6.1"
},
+ "nodeenv": {
+ "hashes": [
+ "sha256:ad8259494cf1c9034539f6cced78a1da4840a4b157e23640bc4a0c0546b0cb7a"
+ ],
+ "version": "==1.3.3"
+ },
"pbr": {
"hashes": [
"sha256:36ebd78196e8c9588c972f5571230a059ff83783fabbbbedecc07be263ccd7e6",
@@ -395,6 +429,14 @@
"index": "pypi",
"version": "==0.8.2"
},
+ "pre-commit": {
+ "hashes": [
+ "sha256:92e406d556190503630fd801958379861c94884693a032ba66629d0351fdccd4",
+ "sha256:cccc39051bc2457b0c0f7152a411f8e05e3ba2fe1a5613e4ee0833c1c1985ce3"
+ ],
+ "index": "pypi",
+ "version": "==1.17.0"
+ },
"pycodestyle": {
"hashes": [
"sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56",
@@ -462,6 +504,13 @@
],
"version": "==1.30.1"
},
+ "toml": {
+ "hashes": [
+ "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c",
+ "sha256:235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e"
+ ],
+ "version": "==0.10.0"
+ },
"unittest-xml-reporting": {
"hashes": [
"sha256:140982e4b58e4052d9ecb775525b246a96bfc1fc26097806e05ea06e9166dd6c",
@@ -469,6 +518,20 @@
],
"index": "pypi",
"version": "==2.5.1"
+ },
+ "virtualenv": {
+ "hashes": [
+ "sha256:b7335cddd9260a3dd214b73a2521ffc09647bde3e9457fcca31dc3be3999d04a",
+ "sha256:d28ca64c0f3f125f59cabf13e0a150e1c68e5eea60983cc4395d88c584495783"
+ ],
+ "version": "==16.6.1"
+ },
+ "zipp": {
+ "hashes": [
+ "sha256:4970c3758f4e89a7857a973b1e2a5d75bcdc47794442f2e2dd4fe8e0466e809a",
+ "sha256:8a5712cfd3bb4248015eb3b0b3c54a5f6ee3f2425963ef2a0125b8bc40aafaec"
+ ],
+ "version": "==0.5.2"
}
}
}