Skip to content

Commit 35ef366

Browse files
add isort hook in pre-commit
1 parent 7eeae3d commit 35ef366

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Diff for: .pre-commit-config.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ repos:
1616
rev: 3.8.4
1717
hooks:
1818
- id: flake8
19+
- repo: https://github.com/PyCQA/isort
20+
rev: 5.6.4
21+
hooks:
22+
- id: isort
1923
- repo: local
2024
hooks:
2125
- id: pylint
2226
name: pylint
2327
entry: pylint
24-
exclude: ^(tests/)|^(docs/)
28+
exclude: ^(tests/)|^(docs/)|^(sample/)
2529
language: system
2630
types: [python]
2731
- repo: https://github.com/pre-commit/mirrors-mypy

Diff for: sample/handler.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1+
from schemas import get_users_query_params_schema, user_schema
2+
13
from pylambdarest import route
2-
from schemas import (
3-
user_schema,
4-
get_users_query_params_schema
5-
)
64

75

86
@route()
@@ -13,10 +11,7 @@ def hello():
1311
@route()
1412
def get_user(user_id):
1513
# request db data for user <user_id> here
16-
user = {
17-
"userId": user_id,
18-
"name": "John Doe"
19-
}
14+
user = {"userId": user_id, "name": "John Doe"}
2015

2116
return 200, user
2217

Diff for: tests/test_route.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
23
import pytest
34

45
from pylambdarest import route

0 commit comments

Comments
 (0)