07:31Type Hints in Real-World Projects: Practical Steps for Continuous Maintenance and Improvement
From the creator
Presented by: Koudai Aono Many Python developers have added type hints and run mypy checks, but still rely on typing. Any too often, keep old typing.List/typing.Dict hints, or use # type: ignore comments everywhere. In that case, typing may feel like just another task, not a tool that truly improves quality. But like unittest, typing can reduce hidden issues and make you confident about changes, even though it does not add new features directly. If we maintain and improve our type hints over time, typing can become a reliable foundation for your project, making refactoring safer and Python upgrades smoother. This talk is not just another basic intro. We’ll show practical steps with before-and-after code examples: - Use ideas from newer features (like typing.TypeIs in Python 3.13) and typing_extensions to apply similar concepts on older versions. - Run pyupgrade (via ruff) to automatically update old hints, reducing manual edits and creating a consistent style. - Apply partial ignores instead of full # type: ignore, and integrate pre-commit and CI checks to catch issues early, making typing checks feel natural. - Add types to example code to detect subtle incompatibilities, similar to how tests find hidden bugs. We’ll also propose a gradual approach so your team won’t be overwhelmed. After this talk, you should see typing as a stable base that reduces bugs, helps with refactoring, and supports long-term growth.
Published 2025-06-10 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





