Add typing for all model manager associations.

Review Request #13369 — Created Oct. 23, 2023 and submitted

Information

Review Board
release-5.0.x

Reviewers

When associating a model manager, the type remains the default of a
Manager[_ModelT]. Unless given a more specific type, callers won't see
the methods on these managers.

This change goes through the codebase and adds explicit typing for each
model manager association. As a note for future associations, these must
be typed as ClassVars in order to safely override the original types.

Unit tests pass.

Verified that I could access methods for some of the ones relevant to my
query work without the type checker complaining.

Summary ID
Add typing for all model manager associations.
When associating a model manager, the type remains the default of a `Manager[_ModelT]`. Unless given a more specific type, callers won't see the methods on these managers. This change goes through the codebase and adds explicit typing for each model manager association. As a note for future associations, these must be typed as `ClassVars` in order to safely override the original types.
e574768261e5d06fb4b681d14742eba8805bfa68
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.0.x (4d7176d)
Loading...