First, love this example. It has helped understand some parts of Starlette.
I would suggest using pre-commit to maintain code quality standards such as black. For example below is what I have in my own .pre-commit-config.yaml. This would eliminate the need to run a script for black or other code standard enforcement.
Black is run (config is in a setup.cfg), fix-encoding-pragma adds "# -- coding: utf-8 -- to the top of python files", trailing-whitespace "This hook trims trailing whitespace", and python-safety-dependencies-check to check for security vulnerabilities.
First, love this example. It has helped understand some parts of Starlette.
I would suggest using pre-commit to maintain code quality standards such as black. For example below is what I have in my own .pre-commit-config.yaml. This would eliminate the need to run a script for black or other code standard enforcement.
Black is run (config is in a setup.cfg), fix-encoding-pragma adds "# -- coding: utf-8 -- to the top of python files", trailing-whitespace "This hook trims trailing whitespace", and python-safety-dependencies-check to check for security vulnerabilities.
repos:
repo: https://github.com/ambv/black rev: 19.10b0 hooks:
repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.4.0 hooks:
repo: https://github.com/Lucas-C/pre-commit-hooks-safety rev: v1.1.0 hooks: