Add type hints for the rest of djblets.integrations.

Review Request #12995 — Created April 27, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-3.x

Reviewers

This adds type hints for all remaining modules and tests in
djblets.integrations, helping people develop or work with
integrations.

A couple minor issues were caught by fixing up types, but had no impact
on consumers:

  • IntegrationConfigForm could crash if manually calling
    get_key_value() or set_key_value() if creating a new
    configuration.

  • Unit test setup for IntegrationConfig's manager wasn't correct. We
    were overriding a classmethod with a standard member function.

With this change, djblets.integrations is now fully typed.

Unit tests, mypy, and pyright pass.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Add type hints for the rest of djblets.integrations.
This adds type hints for all remaining modules and tests in `djblets.integrations`, helping people develop or work with integrations. A couple minor issues were caught by fixing up types, but had no impact on consumers: * `IntegrationConfigForm` could crash if manually calling `get_key_value()` or `set_key_value()` if creating a new configuration. * Unit test setup for `IntegrationConfig`'s manager wasn't correct. We were overriding a classmethod with a standard member function. With this change, `djblets.integrations` is now fully typed.
f383df88eada847fd4771cdea4b3cd494e3bd3c4 Christian Hammond
djblets/integrations/forms.py
djblets/integrations/hooks.py
djblets/integrations/middleware.py
djblets/integrations/mixins.py
djblets/integrations/models.py
djblets/integrations/views.py
djblets/integrations/tests/models.py
djblets/integrations/tests/test_forms.py
djblets/integrations/tests/test_hooks.py
djblets/integrations/tests/test_integration.py
djblets/integrations/tests/test_manager.py
djblets/integrations/tests/test_models.py
djblets/integrations/tests/testcases.py
Loading...