Repository for Murat's talk about MyPy at PizzayPy23
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dockerconf
stubs
.gitignore
README.md
demo1.py
demo2_typing.py
demo3_tuple.py
demo4_union.py
demo5_optional.py
demo6_aliases.py
demo_complex_data.py
demo_stubs.py
demo_stubs_lib.py
demo_stubs_lib.pyi
demo_typeshed_requests.py
demo_typeshed_stdlib.py
limitations_inference.py
mymypy
presentation.org
py36
runmypy

README.md

PizzaPY 23: MyPY

Murat presents static type checking for Python, using MyPy at PizzaPY 23.

What's here?

  • Have a look at presentation.org for the presentation notes. It's an Org-mode file, you'll need Emacs or a viewer to enjoy it fully.
  • There's a bunch of demo files that show particular features of MyPy. See notes below how to try them out quickly.
  • The docker image is available at Docker Hub

Get started with the demo files

To play around with the examples in this repository, follow these steps:

  1. Clone this repo.

On the commandline type:

git clone https://github.com/cebucodecamp/pizzapy23-mypy.git
  1. Run a demo file.

Switch to the directory.

$ cd pizzapy23-mypy

Then check one of the demo files. You should immediately get the error:

$ ./mymypy demo1.py
demo1.py:3: error: Incompatible types in assignment (expression has type "str", variable has type "int")

Then look at the demo files, modify them and run the check again to see the difference.

Happy coding! :)

License

All materials here, code and other content, unless otherwise noted, are published under a CC0 free license.