Typing at scale: statically type-checking a large codebase - Alan Franzoni

Опубликовано: 14 Март 2026
на канале: Python Italia
71
0

Typing at scale: statically type-checking a large codebase - Alan Franzoni - PyCon Italia 2024

Elevator Pitch:
Once upon a type in Pythonland, we would say:
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck."

Then the type-checking team started scoring multiple goals.
Is type-checking useful in Python? What about existing codebases? Recommendations and pitfalls


Description:
Once upon a type in Pythonland, we would say:
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck."

Then the type-checking team started scoring multiple goals.
Is type-checking useful in Python? What about existing codebases? Recommendations and pitfalls.

In this talk, we'll take a look at:
why should you typecheck your code? what are the benefits and drawbacks?
how can you do that without stopping development, but without chasing an ever-changing target?
what are the pitfalls from type checking - can it provide a false sense of security?
How to interact with third party libraries?
Is static type-checking enough, or do we need to runtime check as well?
Is the type checker always right?

This is a case study about how it was done (and is still being done) on a real, large production codebase at Aiven. This is not a theoretical talk - I'll try explaining what are the major pitfalls, what problems were solved and what problems were introduced by type checking.

And I'll finally answer The Big Question: would you do that again?

Learn more: https://2024.pycon.it/event/typing-at...

#CaseStudy #TypeHinting #Scaling