Update typing for some of the extensions code.

Review Request #14633 — Created Oct. 8, 2025 and updated

Information

Djblets
release-5.x

Reviewers

This updates the typing for djblets.extensions.extension and
djblets.extensions.manager, moving to some modern typing constructs
and improving type safety for middleware.

This work is in preparation for some changes to ExtensionManager to
reduce side effects during reloading.

Unit tests pass.

Summary ID
Update typing for some of the extensions code.
This updates the typing for `djblets.extensions.extension` and `djblets.extensions.manager`, moving to some modern typing constructs and improving type safety for middleware. This work is in preparation for some changes to `ExtensionManager` to reduce side effects during reloading.
a25ffce5cdfae7509d99f7cb49593929c5260cea
chipx86
Review request changed
Change Summary:

Added some unstaged changes.

Commits:
Summary ID
Update typing for some of the extensions code.
This updates the typing for `djblets.extensions.extension` and `djblets.extensions.manager`, moving to some modern typing constructs and improving type safety for middleware. This work is in preparation for some changes to `ExtensionManager` to reduce side effects during reloading.
f899a1ff0f5eec2174acd3d418c1cf70dd0b521d
Update typing for some of the extensions code.
This updates the typing for `djblets.extensions.extension` and `djblets.extensions.manager`, moving to some modern typing constructs and improving type safety for middleware. This work is in preparation for some changes to `ExtensionManager` to reduce side effects during reloading.
a25ffce5cdfae7509d99f7cb49593929c5260cea

Checks run (2 succeeded)

flake8 passed.
JSHint passed.