Type hinting
See original GitHub issueI have started to use mypy. Aaaand it is not so good right now.
Libraries lack typing support. And I know that mimesis support only python3.
Do you consider adding type hints?
There are some advantages:
- stricter API
- static analysis support to improve quality
There are some disadvantages:
- type hinting was introduced in
python3.5, so any version prior to that will have to use special comments or other hacks - a lot of manual work
- possible API changes
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (13 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 >Type hinting in PyCharm - JetBrains
To add a type hint, follow these steps: · Select a code element. · Press Alt+Enter . · Select Add type hint for...
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 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

Sooo, it’s done!
@lk-geimfari I’ve already mentioned this in #267, but if one is defaulting the argument to
None, which is automatically pushed totype(None)orNoneType, then we should usetyping.Optional[the_type]. In the example above, we’d haveBy the way, I believe I mistakenly reversed the logic of that predicate in my PR earlier 😛