Skip to content

Commit 676a006

Browse files
committed
Add pre-commit hooks
1 parent 470f7ae commit 676a006

File tree

5 files changed

+1096
-2
lines changed

5 files changed

+1096
-2
lines changed

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 130
3+
exclude = venv,.git,__pycache__,__init__.py,dev
4+
ignore = B008, W503

.pre-commit-config.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.8.0
4+
hooks:
5+
- id: black
6+
7+
- repo: https://github.com/PyCQA/flake8
8+
rev: 5.0.2
9+
hooks:
10+
- id: flake8
11+
additional_dependencies:
12+
- flake8-bugbear
13+
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.10.1
16+
hooks:
17+
- id: isort

fastapi_user_auth/auth/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def decorator(func: Callable = None) -> Union[Callable, Coroutine]:
144144
if isinstance(func, Request):
145145
return depend(func)
146146
sig = inspect.signature(func)
147-
for idx, parameter in enumerate(sig.parameters.values()):
147+
for idx, parameter in enumerate(sig.parameters.values()): # noqa: B007
148148
if parameter.name == "request" or parameter.name == "websocket":
149149
type_ = parameter.name
150150
break

0 commit comments

Comments
 (0)