question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are 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:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SijmenHuizengacommented, Feb 1, 2021

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 ❤️

1reaction
SijmenHuizengacommented, Jan 31, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found