Skip to content

chore: clean remaining ruff/mypy findings and enforce lint in CI#10

Merged
AmirhosseinHonardoust merged 2 commits into
mainfrom
chore/lint-mypy-clean-and-ci-gate
Jun 19, 2026
Merged

chore: clean remaining ruff/mypy findings and enforce lint in CI#10
AmirhosseinHonardoust merged 2 commits into
mainfrom
chore/lint-mypy-clean-and-ci-gate

Conversation

@AmirhosseinHonardoust

Copy link
Copy Markdown
Owner

Finishes the lint/type cleanup and adds enforcement.

  • mypy: fix the 5 real type errors (dict annotations in
    threshold_policy and evaluate; float64 cast on rounded risk
    scores). mypy now reports 0 errors.
  • ruff: split 5 E501 long strings, replace redundant # type: ignore
    with # noqa: E402 on app.py's post-sys.path imports, and convert
    4 SIM108 if/else blocks to ternaries.
  • CI: add a lint job running ruff, black --check, and mypy.

Verified locally (clean env, linters only):

  • ruff: all checks pass; black --check clean; mypy: 0 errors.
  • 34/34 tests pass.
  • Behavior unchanged: regenerated raw dataset is byte-identical
    (md5 match) and threshold_policy.md is byte-identical, confirming
    the string-split and astype edits are no-ops at runtime.

Note: the SHAP-path SIM108 edits run only at runtime/CI (shap not
installed locally); they are equivalent ternary rewrites and both
files compile.

@AmirhosseinHonardoust AmirhosseinHonardoust self-assigned this Jun 19, 2026
@AmirhosseinHonardoust AmirhosseinHonardoust added the enhancement New feature or request label Jun 19, 2026
@AmirhosseinHonardoust
AmirhosseinHonardoust merged commit 60a8969 into main Jun 19, 2026
8 checks passed
@AmirhosseinHonardoust
AmirhosseinHonardoust deleted the chore/lint-mypy-clean-and-ci-gate branch June 19, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant