Skip to content
Draft
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
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.9
hooks:
- id: ruff
- id: ruff-check
args: ["--fix", "--output-format=full"]
- id: ruff-format

Expand All @@ -33,10 +33,11 @@ repos:
args: ["--fix", "--output-format=full", "--ignore=B018", "--ignore=E402"]
files: ^docs/.*\.ipynb$

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
- repo: local
hooks:
- id: mypy
args: [--ignore-missing-imports, --config-file=pixi.toml]
files: ^pyfixest/
additional_dependencies: [numpy>=1.20, pandas-stubs]
- id: ty
name: ty
entry: pixi run -e lint ty check pyfixest
language: system
types: [python]
pass_filenames: false
2 changes: 1 addition & 1 deletion docs/_freeze/changelog/execute-results/html.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion docs/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3662,4 +3662,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
380 changes: 40 additions & 340 deletions pixi.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ lets-plot = ">=4.0.0"
[feature.lint.dependencies]
pre-commit = "==3.6.0"

[feature.lint.pypi-dependencies]
ty = "*"

[feature.build.dependencies]
pip = "*"
maturin = ">=1.8.0"
Expand Down
36 changes: 19 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,22 @@ convention = "numpy"
docstring-code-format = true
docstring-code-line-length = 88

[tool.mypy]

[[tool.mypy.overrides]]
module = [
"pandas.*",
"numpy.*",
"scipy.*",
"numba.*",
"lets_plot.*",
"formulaic.*",
"wildboottest.*",
"tabulate.*",
"joblib.*",
"narwhals.*",
"tqdm.*",
]
ignore_missing_imports = true
[tool.ty.environment]
python-version = "3.9"

[tool.ty.rules]
# Ignore errors from untyped dependencies and gradual typing
# These can be enabled one-by-one as type annotations are improved
unresolved-import = "ignore"
invalid-argument-type = "ignore"
unknown-argument = "ignore"
unresolved-attribute = "ignore"
non-subscriptable = "ignore"
unsupported-operator = "ignore"
invalid-return-type = "ignore"
missing-argument = "ignore"
no-matching-overload = "ignore"
not-iterable = "ignore"
invalid-assignment = "ignore"
unresolved-reference = "ignore"
call-non-callable = "ignore"
1 change: 0 additions & 1 deletion tests/test_wls_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

def _assert_fit_equal(fit1, fit2, vcov_types, rtol=1e-5):
"Assert that two regression fits have identical coefficients, vcov, and SEs."

assert fit1._N == fit2._N, "Number of observations is not the same."

np.testing.assert_allclose(
Expand Down
Loading