{"guid":"812ec8f3-a263-45d3-8362-8e3ff9a18b4f","title":"Static type checking with mypy","subtitle":null,"slug":"sps22-4238-static-type-checking-with-myp","link":"https://c3voc.de","description":"Python is a dynamic language, which gives its users a lot of power. But, as we know, with great power comes great responsibility. Fortunately for us, we can incorporate a tool in our workflows - Mypy. Mypy allows developers to add a layer of safety in their programs - static type annotations. During my talk, I will show you why PEP484 type annotations can be helpful, how to check them, and gradually introduce them in your codebase. Additionally, I want to show some tricks to make the dynamic parts safer. Finally, I will also show situations where Mypy falls short and how to avoid them.\n\nPython is a dynamic language, which gives its users a lot of power. But, as we know, with great power comes great responsibility. Fortunately for us, we can incorporate a tool in our workflows - Mypy. Mypy allows developers to add a layer of safety in their programs - static type annotations. During my talk, I will show you why PEP484 type annotations can be helpful, how to check them, and gradually introduce them in your codebase. Additionally, I want to show some tricks to make the dynamic parts safer. Finally, I will also show situations where Mypy falls short and how to avoid them.","original_language":"eng","persons":["Michal Gutowski"],"tags":["import","4238","2022","Main"],"view_count":43,"promoted":false,"date":"2022-09-22T16:30:00.000+02:00","release_date":"2022-10-30T00:00:00.000+02:00","updated_at":"2024-04-08T22:15:03.771+02:00","length":1811,"duration":1811,"thumb_url":"https://static.media.ccc.de/media/conferences/sps22/4238-812ec8f3-a263-45d3-8362-8e3ff9a18b4f.jpg","poster_url":"https://static.media.ccc.de/media/conferences/sps22/4238-812ec8f3-a263-45d3-8362-8e3ff9a18b4f_preview.jpg","timeline_url":"https://static.media.ccc.de/media/conferences/sps22/4238-812ec8f3-a263-45d3-8362-8e3ff9a18b4f.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/conferences/sps22/4238-812ec8f3-a263-45d3-8362-8e3ff9a18b4f.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/sps22-4238-static-type-checking-with-myp","url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_title":"Swiss Python Summit 2022","conference_url":"https://api.media.ccc.de/public/conferences/sps22","related":[],"recordings":[{"size":205,"length":1811,"mime_type":"video/webm","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-10-30T05:41:11.010+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/webm-hd/import-4238-eng-Static_type_checking_with_mypy_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/63233","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"},{"size":27,"length":1811,"mime_type":"audio/mpeg","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2022-10-30T04:31:23.416+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/mp3/import-4238-eng-Static_type_checking_with_mypy_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/63216","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"},{"size":18,"length":1811,"mime_type":"audio/opus","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2022-10-30T04:28:53.903+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/opus/import-4238-eng-Static_type_checking_with_mypy_opus.opus","url":"https://api.media.ccc.de/public/recordings/63214","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"},{"size":79,"length":1811,"mime_type":"video/webm","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2022-10-30T04:26:49.250+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/webm-sd/import-4238-eng-Static_type_checking_with_mypy_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/63213","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"},{"size":60,"length":1811,"mime_type":"video/mp4","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2022-10-30T04:06:05.290+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/h264-sd/import-4238-eng-Static_type_checking_with_mypy_sd.mp4","url":"https://api.media.ccc.de/public/recordings/63212","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"},{"size":169,"length":1811,"mime_type":"video/mp4","language":"eng","filename":"import-4238-eng-Static_type_checking_with_mypy_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2022-10-30T03:20:47.541+01:00","recording_url":"https://cdn.media.ccc.de/events/sps22/h264-hd/import-4238-eng-Static_type_checking_with_mypy_hd.mp4","url":"https://api.media.ccc.de/public/recordings/63194","event_url":"https://api.media.ccc.de/public/events/812ec8f3-a263-45d3-8362-8e3ff9a18b4f","conference_url":"https://api.media.ccc.de/public/conferences/sps22"}]}