Update reviewboard.codesafety and reviewboard.registries for type hints.

Review Request #12782 — Created Jan. 11, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This enables type hints throughout reviewboard.codesafety, and in
reviewboard.registries to support typed registries. This ensures that
callers and implementations agree on types, which is important given
that dictionaries are often passed around.

The change is a precursor to some upcoming work on code safety checkers
for custom Unicode confusable settings.

Unit tests pass on Python 3.7-3.11.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Update reviewboard.codesafety and reviewboard.registries for type hints.
This enables type hints throughout `reviewboard.codesafety`, and in `reviewboard.registries` to support typed registries. This ensures that callers and implementations agree on types, which is important given that dictionaries are often passed around. The change is a precursor to some upcoming work on code safety checkers for custom Unicode confusable settings.
1bd6ad4d58a468d028cb06cbd13efcae59426fcc Christian Hammond
reviewboard/codesafety/checkers/base.py
reviewboard/codesafety/checkers/registry.py
reviewboard/codesafety/checkers/trojan_source.py
reviewboard/codesafety/tests/test_trojan_source_code_safety_checker.py
reviewboard/registries/registry.py
Loading...