Skip to content

Commit 9245914

Browse files
committed
Add mypy dependencies
And configure mypy. However, there are still a ton of errors. Not ready to add this to CI yet.
1 parent a5c8f62 commit 9245914

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

mypy.ini

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[mypy]
2+
python_version = 3.11
3+
warn_return_any = True
4+
warn_unused_configs = True
5+
disallow_untyped_defs = False
6+
disallow_incomplete_defs = False
7+
check_untyped_defs = False
8+
disallow_untyped_decorators = True
9+
no_implicit_optional = True
10+
warn_redundant_casts = True
11+
warn_unused_ignores = True
12+
warn_no_return = True
13+
warn_unreachable = True
14+
15+
[mypy-*]
16+
disallow_untyped_defs = False
17+
check_untyped_defs = False
18+
19+
[mypy-django.*]
20+
ignore_missing_imports = True
21+
22+
[mypy-sentry_sdk.*]
23+
ignore_missing_imports = True
24+
25+
[mypy-posthog.test.*]
26+
ignore_errors = True
27+
28+
[mypy-posthog.*.test.*]
29+
ignore_errors = True

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,18 @@
2525
extras_require = {
2626
"dev": [
2727
"black",
28+
"django-stubs",
2829
"isort",
2930
"flake8",
3031
"flake8-print",
32+
"lxml",
33+
"mypy",
34+
"mypy-baseline",
35+
"types-mock",
36+
"types-python-dateutil",
37+
"types-requests",
38+
"types-setuptools",
39+
"types-six",
3140
"pre-commit",
3241
],
3342
"test": [

0 commit comments

Comments
 (0)