Add precommit and run precommit on all files
Adds pre-commit and runs it on all the current files. I skipped a few validations so I'm not making too many big changes and also set the max-line-length to 120:
(venv) flask-graphql|add-precommit ⇒ git commit -am "Add precommit and run precommit on all files"
autopep8 wrapper.........................................................Passed
Check for added large files..............................................Passed
Check python ast.........................................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...........................................(no files to check)Skipped
Check for merge conflicts................................................Passed
Check Yaml...............................................................Passed
Debug Statements (Python)................................................Passed
Fix double quoted strings................................................Passed
Fix End of Files.........................................................Passed
Flake8...................................................................Failed
hookid: flake8
tests/test_graphqlview.py:38:1: E731 do not assign a lambda expression, use a def
tests/test_graphqlview.py:39:1: E731 do not assign a lambda expression, use a def
tests/test_graphqlview.py:452:1: F811 redefinition of unused 'test_supports_pretty_printing' from line 328
Fix python encoding pragma...............................................Passed
Tests should end in _test.py.............................................Failed
hookid: name-tests-test
tests/schema.py does not match pattern ".*_test.py"
tests/test_graphqlview.py does not match pattern ".*_test.py"
tests/test_graphiqlview.py does not match pattern ".*_test.py"
tests/app.py does not match pattern ".*_test.py"
Pretty format JSON...................................(no files to check)Skipped
Fix requirements.txt.....................................................Passed
Trim Trailing Whitespace.................................................Passed
pyupgrade................................................................Passed
Reorder python imports...................................................Passed
Coverage increased (+0.1%) to 96.629% when pulling 93ca54f674b539b5af6694bcf6ea4d13aca5cab0 on tomelm:add-precommit into 724695aaa62e3911246ac5678d78229afefe2a6f on graphql-python:master.
Coverage increased (+0.1%) to 96.629% when pulling 93ca54f674b539b5af6694bcf6ea4d13aca5cab0 on tomelm:add-precommit into 724695aaa62e3911246ac5678d78229afefe2a6f on graphql-python:master.
Coverage increased (+0.1%) to 96.629% when pulling 93ca54f674b539b5af6694bcf6ea4d13aca5cab0 on tomelm:add-precommit into 724695aaa62e3911246ac5678d78229afefe2a6f on graphql-python:master.
Other than the comments, everything is looking great... thanks for the work @tomelm! :)