Fix some typing around AppliesToURLMixin.
Review Request #14549 — Created Aug. 4, 2025 and submitted
AppliesToURLMixinhad the wrong base class, usingExtensioninstead
ofExtensionHook, which ended up breaking the typing for
initialize()and other methods for anything subclassing a hook using
AppliesToURLMixin.This fixes that, switches to
Sequence[str]instead ofList[str]for
the parameter, and adds typing for the attribute.
Unit tests pass.
Verified this fixed issues I hit with some extension work.
| Summary | ID |
|---|---|
| d3cd07b3a710309254e5ad776c5fdab52792f720 |
| Description | From | Last Updated |
|---|---|---|
|
While we're here, can we make this default to None and initialize to [] in the constructor? |
|
- Change Summary:
-
Switched the default for
apply_toto a non-mutableNone. - Commits:
-
Summary ID 38d3962fb960b30cb2517567f28e907d2a14eeff d3cd07b3a710309254e5ad776c5fdab52792f720 - Diff:
-
Revision 2 (+20 -6)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.