Repository navigation
chore/prek and ty enforcement - #39
Merged
Merged
Conversation
JavierGOrdonnez
marked this pull request as ready for review
August 19, 2026 16:36
added 4 commits
August 19, 2026 18:37
…cs cleanup V40gz/V41hp + T41hp/T42jn + B13qf (backprop for the 3 Python-3.10 compat bugs found earlier in this stack).
…x_vite - .pre-commit-config.yaml: ruff/ruff-format via astral-sh/ruff-pre-commit, local ty check hook, pre-commit-hooks file hygiene - Makefile: prek/pre-commit targets (uvx prek run --all-files) - README: Development > Code quality section documenting the hook - Incidental: --all-files run auto-fixed pre-existing trailing-whitespace/ missing-EOF-newline violations in a few files outside this stack's scope (docs-deploy.yml, version-check.yml, .gitignore, DAKOTA-STUBS.md)
- data/funs_data_processing.py: widen distributions dict value type to float | str (the 'distribution' key is always a string alongside numeric params) and propagate through funs_evaluate.py call sites; widen is_dominated's other_points to accept both a 2D ndarray and a plain sequence of 1D arrays (both are real call patterns) - api/_session.py: assert self._preprocessor is not None before get_inverse_mapping() (mirrors the existing _mapped_name pattern); use typing.cast instead of a mismatched mypy-style '# type: ignore[arg-type]' (ty doesn't recognize that code name) - sampling/lhs.py: np.identity(..., dtype=bool) for the MaskedArray mask (was float64, only one overload accepts a bool mask) - scripts/dev_version.py: narrow regex .fullmatch() results before .group(); '# ty: ignore[unresolved-import]' on the tomllib import (only resolvable per requires-python's 3.10 floor, not the analysis venv's own interpreter -- inherent to cross-version fallback code); make tomli an unconditional dev dependency so the ignore comment's "used" status doesn't flip depending on which Python version's venv ty happens to run under - examples/generate_docs_figures.py: pd.Index(...) instead of a bare list for DataFrame columns (pandas stub protocol variance quirk); excluded examples/ from ty's default scope (needs the docs dependency group, which isn't part of --all-extras --dev) - tests/*: narrow Path | None / regex-match-or-None locals with asserts; '# ty: ignore[...]' only on the handful of call sites that deliberately pass a wrong type/value to assert a runtime error path (adversarial input tests, not real signatures); removed stale unused '# type: ignore' comments
Repo is now diagnostic-clean (T42jn); ty stays version-aware against requires-python's floor so it keeps catching the Python-3.10 compat bug class (V41hp) that the test matrix would otherwise be the only thing to surface.
JavierGOrdonnez
force-pushed
the
chore/prek-and-ty-enforcement
branch
from
August 19, 2026 16:37
c3ce162 to
4ea89f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack created with GitHub Stacks CLI • Give Feedback 💬