-
Notifications
You must be signed in to change notification settings - Fork 0
Typing
Mateus Oliveira edited this page Sep 7, 2022
·
4 revisions
I do not like JavaScript, but I do like TypeScript. And that made me want to have static typing in Python, which is not a static programming language, i.e. type checking analysis are performed without executing the code. For example, in Python you can define variables values without defining the variable type. In TypeScript you can not do this.
The template does not enforce this, but you could do it using pydantic, for example, when parsing user inputs.
The template enforces typing with:
- mypy: if there are objects without type hints or wrong typings, mypy will indicate them.
https://github.com/mateusoliveira43/python-project-template/blob/main/pyproject.toml#L46-L49
The command mypy .
will check the project typing.