I’m busy re-applying this “gradual import” technique on a client project today. Will slowly get them up to a full django-stubs installation.
https://adamj.eu/tech/2022/08/23/python-type-hints-gradually-add-types-for-third-party-packages/
Python Type Hints: How to Gradually Add Types for Third Party Packages - Adam Johnson
Hynek Schlawack recently described graduality as Python’s super power: the ability to prototype in the REPL, and gradually add linting, type checking, and other practices to refine your code into maintainable, production-ready software. You can also apply graduality within tools, activating checks one at a time and fixing the resulting errors as you go.