diff --git a/Pipfile b/Pipfile index 8d08e0bd..ad8b8fe0 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,9 @@ requests = "*" isort = "*" databases = {extras = ["sqlite"],version = "*"} pytest-asyncio = "*" +flake8-docstrings = "*" +flake8-commas = "*" +flake8-quotes = "*" [packages] fastapi = "*" diff --git a/Pipfile.lock b/Pipfile.lock index e925284a..16aaf184 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "3f2120d9354ee0e8e94a16b4dd1c948e2eb13d91fd71798c4005effc786b93f0" + "sha256": "f7c633af131b61f7664ea0e0bd6a0f68c21ba9bcde07d86d99e44a9a136fd0ae" }, "pipfile-spec": 6, "requires": { @@ -227,6 +227,29 @@ "index": "pypi", "version": "==3.7.8" }, + "flake8-commas": { + "hashes": [ + "sha256:d3005899466f51380387df7151fb59afec666a0f4f4a2c6a8995b975de0f44b7", + "sha256:ee2141a3495ef9789a3894ed8802d03eff1eaaf98ce6d8653a7c573ef101935e" + ], + "index": "pypi", + "version": "==2.0.0" + }, + "flake8-docstrings": { + "hashes": [ + "sha256:3d5a31c7ec6b7367ea6506a87ec293b94a0a46c0bce2bb4975b7f1d09b6f3717", + "sha256:a256ba91bc52307bef1de59e2a009c3cf61c3d0952dbe035d6ff7208940c2edc" + ], + "index": "pypi", + "version": "==1.5.0" + }, + "flake8-quotes": { + "hashes": [ + "sha256:5dbaf668887873f28346fb87943d6da2e4b9f77ce9f2169cff21764a0a4934ed" + ], + "index": "pypi", + "version": "==2.1.0" + }, "idna": { "hashes": [ "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", @@ -292,6 +315,13 @@ ], "version": "==2.5.0" }, + "pydocstyle": { + "hashes": [ + "sha256:04c84e034ebb56eb6396c820442b8c4499ac5eb94a3bda88951ac3dc519b6058", + "sha256:66aff87ffe34b1e49bff2dd03a88ce6843be2f3346b0c9814410d34987fbab59" + ], + "version": "==4.0.1" + }, "pyflakes": { "hashes": [ "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0", @@ -337,6 +367,13 @@ ], "version": "==1.12.0" }, + "snowballstemmer": { + "hashes": [ + "sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0", + "sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52" + ], + "version": "==2.0.0" + }, "sqlalchemy": { "hashes": [ "sha256:272a835758908412e75e87f75dd0179a51422715c125ce42109632910526b1fd" diff --git a/fastapi_users/authentication/jwt.py b/fastapi_users/authentication/jwt.py index f7858de2..eb70be00 100644 --- a/fastapi_users/authentication/jwt.py +++ b/fastapi_users/authentication/jwt.py @@ -10,7 +10,7 @@ from starlette.responses import Response from fastapi_users.authentication import BaseAuthentication from fastapi_users.models import UserDB -oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/login") +oauth2_scheme = OAuth2PasswordBearer(tokenUrl='/login') def generate_jwt(data: dict, lifetime_seconds: int, secret: str, algorithm: str) -> str: diff --git a/setup.cfg b/setup.cfg index 10d7ac2a..f652669a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,7 @@ [flake8] exclude = docs max-line-length = 119 +docstring-convention = numpy [isort] atomic = true