Skip to content

Commit b972ae2

Browse files
committed
init
1 parent 4abb697 commit b972ae2

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ repos:
4848
additional_dependencies:
4949
# Support pyproject.toml configuration
5050
- tomli
51+
- repo: https://github.com/pre-commit/mirrors-mypy
52+
rev: v1.18.2
53+
hooks:
54+
- id: mypy
55+
args: [--ignore-missing-imports]
56+
files: ^causalpy/
57+
additional_dependencies: [numpy>=1.20, pandas-stubs]

pyproject.toml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ dependencies = [
5050
#
5151
# Similar to `dependencies` above, these must be valid existing projects.
5252
[project.optional-dependencies]
53-
dev = ["pathlib", "pre-commit", "twine", "interrogate", "codespell", "nbformat", "nbconvert"]
53+
dev = [
54+
"pathlib",
55+
"pre-commit",
56+
"twine",
57+
"interrogate",
58+
"codespell",
59+
"nbformat",
60+
"nbconvert",
61+
]
5462
docs = [
5563
"ipykernel",
5664
"daft-pgm",
@@ -71,7 +79,7 @@ docs = [
7179
"sphinx-design",
7280
"sphinx-togglebutton",
7381
]
74-
lint = ["interrogate", "pre-commit", "ruff"]
82+
lint = ["interrogate", "pre-commit", "ruff", "mypy"]
7583
test = ["pytest", "pytest-cov", "codespell", "nbformat", "nbconvert"]
7684

7785
[project.urls]
@@ -129,10 +137,7 @@ ignore-words = "./docs/source/.codespell/codespell-whitelist.txt"
129137
skip = "*.ipynb,*.csv,pyproject.toml,docs/source/.codespell/codespell-whitelist.txt"
130138

131139
[tool.coverage.run]
132-
omit = [
133-
"*/conftest.py",
134-
"*/tests/conftest.py",
135-
]
140+
omit = ["*/conftest.py", "*/tests/conftest.py"]
136141

137142
[tool.coverage.report]
138143
exclude_lines = [
@@ -147,3 +152,22 @@ exclude_lines = [
147152
"class .*\\bProtocol\\):",
148153
"@(abc\\.)?abstractmethod",
149154
]
155+
156+
[tool.mypy]
157+
files = "causalpy/*.py"
158+
exclude = "build|dist|docs|notebooks|tests|setup.py"
159+
160+
[tool.mypy-matplotlib]
161+
ignore_missing_imports = true
162+
163+
[tool.mypy-pymc]
164+
ignore_missing_imports = true
165+
166+
[tool.mypy-seaborn]
167+
ignore_missing_imports = true
168+
169+
[tool.mypy-sklearn]
170+
ignore_missing_imports = true
171+
172+
[tool.mypy-scipy]
173+
ignore_missing_imports = true

0 commit comments

Comments
 (0)