Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit acee258

Browse files
committed
feat: Verify basic typing using mypy
1 parent 1d908d9 commit acee258

File tree

9 files changed

+305
-8
lines changed

9 files changed

+305
-8
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ repos:
2626
stages: [commit]
2727
types: [python]
2828

29+
- id: mypy
30+
name: mypy
31+
entry: mypy
32+
language: system
33+
stages: [commit]
34+
types: [python]
35+
2936
- id: pylint
3037
name: pylint
3138
entry: pylint

backend/endpoints/datasets/create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Create dataset function."""
22

3-
from jsonschema import ValidationError, validate
3+
from jsonschema import ValidationError, validate # type: ignore
44

55
from ..utils import error_response, success_response
66
from .common import DATASET_TYPES

backend/endpoints/datasets/delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Delete dataset function."""
22

3-
from jsonschema import ValidationError, validate
3+
from jsonschema import ValidationError, validate # type: ignore
44
from pynamodb.exceptions import DoesNotExist
55

66
from ..utils import error_response, success_response

backend/endpoints/datasets/entrypoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Dataset endpoint Lambda function.
33
"""
44

5-
from jsonschema import ValidationError, validate
5+
from jsonschema import ValidationError, validate # type: ignore
66

77
from ..utils import error_response
88
from .create import create_dataset

backend/endpoints/datasets/get.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Get datasets functions."""
22

3-
from jsonschema import ValidationError, validate
3+
from jsonschema import ValidationError, validate # type: ignore
44
from pynamodb.exceptions import DoesNotExist
55

66
from ..utils import error_response, success_response

backend/endpoints/datasets/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Update dataset function."""
22

3-
from jsonschema import ValidationError, validate
3+
from jsonschema import ValidationError, validate # type: ignore
44
from pynamodb.exceptions import DoesNotExist
55

66
from ..utils import error_response, success_response

infra/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import os
88

9-
from aws_cdk import core
10-
from datalake.datalake_stack import DataLakeStack # pylint: disable=import-error
9+
from aws_cdk import core # type: ignore
10+
from datalake.datalake_stack import DataLakeStack # type: ignore # pylint: disable=import-error
1111

1212
ENV = os.environ.get("DEPLOY_ENV", "dev")
1313

poetry.lock

Lines changed: 289 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ pynamodb = {version="*", optional=true}
3737
[tool.poetry.dev-dependencies]
3838
black = "*"
3939
boto3 = "*"
40+
boto3-stubs = "*"
4041
gitlint = "*"
4142
isort = "*"
43+
mypy = "*"
4244
pre-commit = "*"
4345
pylint = "*"
4446
pytest = "*"

0 commit comments

Comments
 (0)