HomeSoftware Heritage

Update type annotations and signatures to match djangorestframework-stubs

Description

Update type annotations and signatures to match djangorestframework-stubs

I noticed this because my virtualenv ended up with the djangorestframework-stubs
package installed, which made the mypy pre-commit hook fail.

This commit adds drf-stubs to the tox.ini, and does the relevant updates to our
type annotations/signatures.

Turns out that upstream DRF has all request parameters named that way, so we
rename all our req parameters to match, which appeases mypy's signature
checks.

Details

Provenance
olasdAuthored on Apr 8 2020, 8:40 PM
olasdPushed on Apr 8 2020, 11:57 PM
Differential Revision
D2985: Update type annotations and signatures to match djangorestframework-stubs
Parents
rDDEP1bc1732fded7: Add a pyproject.toml file to target py37 for black
Branches
Unknown
Tags
Unknown
Build Status
Buildable 11733
Build 17784: test-and-buildJenkins console · Jenkins