From 957fd9cc20adf3010636d620a5228d5ba7f67323 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 16 Nov 2022 10:48:01 +0100 Subject: [PATCH] flake8: check F811 about redefinition of unused name --- .flake8 | 3 +-- examples/service-fastapi/app/service.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index a016c4dc..77095d0c 100644 --- a/.flake8 +++ b/.flake8 @@ -5,9 +5,8 @@ # C: complexity # D: docstring warnings (unused pydocstyle extension) # F401: module imported but unused -# F811: redefinition of unused `name` from line `N` # F841: local variable assigned but never used -ignore = E, C, W, D, F401, F811, F841 +ignore = E, C, W, D, F401, F841 builtins = c, get_config exclude = .cache, diff --git a/examples/service-fastapi/app/service.py b/examples/service-fastapi/app/service.py index 81d7b87d..8aaeef94 100644 --- a/examples/service-fastapi/app/service.py +++ b/examples/service-fastapi/app/service.py @@ -51,7 +51,7 @@ async def me(user: User = Depends(get_current_user)): @router.get("/debug") -async def index(request: Request, user: User = Depends(get_current_user)): +async def debug(request: Request, user: User = Depends(get_current_user)): """ Authenticated function that returns a few pieces of debug * Environ of the service process