This release updates recommended mypy version to 1.0.x.
In addition to code contributions, I'd like to thank @PedroPerpetua @sobolevn @mschoettle @piotrszyma for helping out with reviews.
What's Changed
Type stubs
- Allow subclasses of APIView to override get_permissions with return type implementing _SupportsHasPermission by @guldfisk in #320
- Add return type to APIClient.get method by @piotrszyma in #330
- Fix type of data parameter in get test requests by @nils-van-zuijlen in #267
Type stubs: Serializer fields
- Fix encoder and decoder params on JSONField by @zetahernandez in #304
- Add missing allow_empty arg to ManyRelatedField by @guldfisk in #322
- Add max_length and min_length args for ListSerializer signature by @imamatory in #336
Type stubs: Strings/translations
- Allow StrPromise to be used in exceptions by @XF-FW in #297
- Allow StrOrPromise in various places by @terencehonles & @piotrszyma in #301 & #331
Dependencies
- Upgrade to Mypy 1.0 by @christianbundy in #339
- Update Black to 23.1.0 and reformat with new style by @intgr in #335
CI & Housekeeping
- Run pre-commit isort on pyi files by @intgr in #347
- Fix CI: add typecheck suppression & upgrade flake8-pyi by @intgr in #303
- Fix CI typecheck (add new ignore) by @intgr in #311
- Fix CI: Run apt-get update before install by @intgr in #316
- Fix CI typecheck (add new ignores) by @intgr in #323
- CI: Freeze DRF commit used in typecheck_tests and types-requests/types-urllib3 by @intgr in #345
- CI: Use django-stubs 1.14.0 for testing by @intgr in #346
- CI: Enable testing with Python 3.11 by @intgr in #284
- Version 1.9.0 release by @intgr in #357
New Contributors
- @zetahernandez made their first contribution in #304
- @guldfisk made their first contribution in #320
- @piotrszyma made their first contribution in #330
- @imamatory made their first contribution in #336
- @christianbundy made their first contribution in #339
- @nils-van-zuijlen made their first contribution in #267
Full Changelog: 1.8.0...1.9.0