Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
pre-commit run --all-files typos
pre-commit run --all-files nbstripout
pre-commit run --all-files ruff-check
pre-commit run --all-files mypy
pre-commit run --all-files ty
87 changes: 46 additions & 41 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,47 +32,52 @@ repos:
- id: ruff-format
files: ^((skore|skore-hub-project|skore-local-project)/(hatch|src|tests))|(examples)/

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
- repo: local
hooks:
- id: ty
alias: ty-skore
name: ty skore/
entry: ty check --project skore skore
language: python
pass_filenames: false
additional_dependencies:
- ty
- IPython
- anywidget
- ipywidgets
- joblib
- matplotlib
- numpy
- pandas
- plotly
- rich
- scikit-learn
- skrub
- seaborn
- polars
- pyarrow

- id: mypy
pass_filenames: false
alias: mypy-skore
name: mypy skore/
files: ^skore/
args: [--config-file=skore/pyproject.toml, skore]
additional_dependencies:
# from dependencies
- IPython
- anywidget
- ipywidgets
- joblib
- matplotlib
- numpy
- pandas
- plotly
- rich
- scikit-learn
- skrub
- seaborn
# from test dependencies
- polars
- pyarrow
- scipy-stubs
- id: ty
alias: ty-skore-hub-project
name: ty skore-hub-project/
entry: ty check --project skore-hub-project skore-hub-project
language: python
pass_filenames: false
additional_dependencies:
- ty
- skore
- blake3
- httpx
- orjson
- pandas-stubs
- pydantic

- id: mypy
pass_filenames: false
alias: mypy-skore-hub-project
name: mypy skore-hub-project/
files: ^skore-hub-project/
args: [--config-file=skore-hub-project/pyproject.toml, skore-hub-project]
additional_dependencies: [skore, blake3, httpx, orjson, pandas-stubs, pydantic]

- id: mypy
pass_filenames: false
alias: mypy-skore-local-project
name: mypy skore-local-project/
files: ^skore-local-project/
args: [--config-file=skore-local-project/pyproject.toml, skore-local-project]
additional_dependencies: [skore]
- id: ty
alias: ty-skore-local-project
name: ty skore-local-project/
entry: ty check --project skore-local-project skore-local-project
language: python
pass_filenames: false
additional_dependencies:
- ty
- skore
35 changes: 21 additions & 14 deletions skore-hub-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,25 @@ convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]

[tool.mypy]
exclude = ["hatch/", "tests/"]
strict = true

[[tool.mypy.overrides]]
follow_untyped_imports = true
module = ["skore.*"]

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"joblib.*",
"scipy.*",
"sklearn.*",
[tool.ty.src]
exclude = ["hatch/**", "tests/**"]

[tool.ty.analysis]
allowed-unresolved-imports = [
"joblib.**",
"scipy.**",
"sklearn.**",
]

[[tool.ty.overrides]]
include = ["skore/**"]

[tool.ty.overrides.analysis]
respect-type-ignore-comments = true

[tool.ty.rules]
unresolved-import = "ignore"
unknown-argument = "ignore"
invalid-argument-type = "ignore"
unused-type-ignore-comment = "ignore"
invalid-type-form = "ignore"
28 changes: 16 additions & 12 deletions skore-local-project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,21 @@ convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]

[tool.mypy]
exclude = ["hatch/", "tests/"]
strict = true

[[tool.mypy.overrides]]
follow_untyped_imports = true
module = ["skore.*"]
[tool.ty.src]
exclude = [
"hatch/**",
"tests/**",
]

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"diskcache.*",
"joblib.*",
[tool.ty.analysis]
allowed-unresolved-imports = [
"diskcache.**",
"joblib.**",
]

[tool.ty.rules]
unresolved-import = "ignore"
unknown-argument = "ignore"
invalid-argument-type = "ignore"
unresolved-attribute = "ignore"
invalid-assignment = "ignore"
29 changes: 15 additions & 14 deletions skore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,19 @@ convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]

[tool.mypy]
exclude = ["src/skore/_externals/", "hatch/", "tests/"]
[tool.ty.src]
exclude = ["hatch/**", "src/skore/_externals/**", "tests/**"]

[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"ipywidgets.*",
"jinja2.*",
"joblib.*",
"pandas.*",
"plotly.*",
"seaborn.*",
"sklearn.*",
"skrub.*",
]
[tool.ty.rules]
unresolved-import = "ignore"
unknown-argument = "ignore"
invalid-argument-type = "ignore"
missing-argument = "ignore"
call-non-callable = "ignore"
no-matching-overload = "ignore"
invalid-return-type = "ignore"
redundant-cast = "ignore"
unused-type-ignore-comment = "ignore"
invalid-assignment = "ignore"
unresolved-attribute = "ignore"
possibly-missing-attribute = "ignore"