Enforce typing
See original GitHub issueWe want to enforce typing in Circle-ci.
To do so, we need to invest the necessary time to make the codebase fully typed. Since this work is fairly invasive, It can happen in multiple pull request to avoid too much code conflict.
The Makefile already contains the typecheck
command. When the work is done the typecheck
command should be added to the test
command
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:19 (19 by maintainers)
Top Results From Across the Web
enforce-typing
An easy to use decorator to enforce static typing for function and dataclasses.
Read more >matchawine/python-enforce-typing: An easy to use ...
An easy to use decorator to enforce static typing for function and dataclasses. - GitHub - matchawine/python-enforce-typing: An easy to use ...
Read more >Support for type hints — Python 3.11.1 documentation
Source code: Lib/typing.py This module provides runtime support for type hints. ... The Python runtime does not enforce function and variable type ......
Read more >Possible to enforce type hints? - python
Going into type_enforced , the package allows you to take advantage of type hints. It supports both input and output typing. Only types...
Read more >Python Type Checking (Guide)
Type annotations and type hints; Adding static types to code, both your code and the code of others; Running a static type checker;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just to note about the timeline: After a quick look, the next debian version having python3.6 by default will land in March 2019.
About
strip-hints
, the doc saysThe processed code is written to stdout
so we can dump every files without types with a good command line normally (unlessstrip-hints
breaks our code of course).the command
make typecheck
returns a certain amount of errors but not too much. And most of the possible typing use case can have an example in the existing codebase.Unless typing reveals a bad design which completely blocks the typing I would say, someone, can do it in 2 full days focused on it.