Type hints
See original GitHub issueAre there plans to add type annotations or stub files for mypy?
I’ve written an article about type annotations if you need one 😃
A related topic is the Python 2.7 support. Stub files can be added without affecting any runtime, but they are harder to maintain (as they are extra files - I’m not sure how often schedule
is refactored / new functionality is added).
Having Python 3.6+ would allow schedule to use a very nice annotation syntax. Generally speaking, this type of type annotations makes code way easier to read.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
typing — Support for type hints — Python 3.11.1 documentation
This module provides runtime support for type hints. The most fundamental support consists of the types Any , Union , Callable , TypeVar...
Read more >Type Hinting - Real Python
In this lesson, you'll learn about type hinting in Python. Type hinting is a formal solution to statically indicate the type of a...
Read more >Type hints cheat sheet - mypy 0.991 documentation
Type hints cheat sheet#. This document is a quick cheat sheet showing how to use type annotations for various common types in Python....
Read more >Python Type Hints
Python's type hints provide you with optional static typing to leverage the best of both static and dynamic typing. The following example defines...
Read more >Type Hints in Python - GeeksforGeeks
Type Hints in Python ... Python is a dynamically typed language, which means you never have to explicitly indicate what kind of variable...
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 FreeTop 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
Top GitHub Comments
ah yes, I have no idea how to do auto-formatting using flake8, I just manually fix the errors 😆 Never took the time to figure that out. If you do, sharing would be much appreciated ❤️
Python 2.7 has been dropped! Is anyone willing to implement this and create a pr?
We can add the type hints to the main source file itself. Let’s focus on the library code first, adding types to the testing code is optional