Add type hints for IntegrationManager.
Review Request #12994 — Created April 27, 2023 and submitted
This adds type hints for
IntegrationManager
, helping ensure that code
interacting with anIntegrationManager
passes around the right types.
These type hints also cover instance variables, letting IDEs and type
checkers show details on these attributes.
Unit tests, mypy, and pyright pass.
Summary | ID |
---|---|
02a75daa37799fa446601e194e1a5fa0dbdc88fc |
Description | From | Last Updated |
---|---|---|
'typing.Generic' imported but unused Column: 1 Error code: F401 |
reviewbot | |
The only thing we're using from weakref is WeakValueDictionary. Can we do a from weakref import WeakValueDictionary to make this … |
david | |
Can we make an alias for Type[Integration]? We use it a lot. |
david | |
undefined name 'Integration' Column: 39 Error code: F821 |
reviewbot | |
undefined name 'Integration' Column: 10 Error code: F821 |
reviewbot | |
undefined name 'Integration' Column: 44 Error code: F821 |
reviewbot | |
undefined name 'Integration' Column: 10 Error code: F821 |
reviewbot |
- Testing Done:
-
~ Unit tests pass.
~ Unit tests, mypy, and pyright pass.
- Commits:
-
Summary ID 3c622fb1f4c1cfdc1c924d7f4bc2819a24072ee0 bc83879805ed79c59a5c96a41d2830fe22606391
Checks run (2 succeeded)
- Change Summary:
-
- Simplified an import around
weakref
. - Added an
IntegrationClassType
type alias.
- Simplified an import around
- Commits:
-
Summary ID bc83879805ed79c59a5c96a41d2830fe22606391 da8306cfb039eeda2ba4106ba6c5075450084df6