Type check scripts/scan-txlog with mypy --strict

Open
#8,085 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
testing, tooling

Research direction

Start by reading scripts/check-python-types.sh and scripts/python-locations.sh to see how the scripts are checked and excluded. Then inspect scripts/scan-txlog and scan_txlog.py, run mypy with --strict, and work through the reported errors, checking the name-defined findings for real bugs. Done means the script is included in python_pathspecs, the exclusions are removed, strict type checking passes, and the lack of unit tests has been considered.

Written by the indexing model from the issue text.

Description

Part of #7987. scripts/scan-txlog is excluded from scripts/check-python-types.sh because it has about 1300 --strict errors (mostly missing annotations, plus ~75 name-defined that may be real bugs; scan_txlog.py alone has ~950).

Annotate it, then add it to python_pathspecs in scripts/python-locations.sh and remove the exclusions there. It also has no unit tests yet.

Dominant language
Scala
Stars
118
Forks
125
Avg merge
22h 35m
Merged PRs (30d)
340

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from canton-network/splice

All issues in canton-network/splice

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.