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.

Will you accept inline type hints for the peewee like

    # type: () -> None

as PR?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

49reactions
coleifercommented, Jun 21, 2017

No, type hints are, in my opinion, an abomination that has no business being part of the Python language 😃

25reactions
awilliamsoncommented, Jul 4, 2018

@coleifer I’m not a strong proponent of Static Typing, but the type annotations are extremely useful when developing to help catch bugs. I debug enough Python at runtime, the more I can do to reduce that, the better.

Mypy is optional, you can choose to put annotations on things, for clarity. If the inclusion of these things only ever produces net gain, why not apply them. It’s not an either-or camp. The degree to which you add Static Types is varying.

Surely you can see the point of view of why Type annotations may be extremely useful? And in no ways detracts from the power and flexibility of Python by its inclusion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Type Checking With Mypy - Real Python
Based on the type hints, Mypy is able to tell you that you are using the wrong type on line 10. To fix...
Read more >
Python Type Hints/Annotations, and Mypy - Level Up Coding
This blog post will walk through on some techniques in enforcing optional typing rules to your project through type hints, dataclasses, and ...
Read more >
mypy - Optional Static Typing for Python
mypy. Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static...
Read more >
PEP 484 – Type Hints - Python Enhancement Proposals
This includes support for off-line type checkers such as mypy, as well as providing a standard notation that can be used by IDEs...
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