In brief
Python does not automatically enforce type annotations at runtime. A declaration such as amount: int helps tools and readers but does not itself block unsuitable data from an external file.
Useful to know
Python does not automatically enforce type annotations at runtime. A declaration such as amount: int helps tools and readers but does not itself block unsuitable data from an external file. [1]
Check types, ranges and missing fields in the import logic. Static analysis complements runtime validation. Passing an analysis does not prove that every future request contains valid data.
Sources
For further detail and to check the information: