Update reviewboard.codesafety and reviewboard.registries for type hints.
Review Request #12782 — Created Jan. 11, 2023 and submitted — Latest diff uploaded
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.
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 |
---|