NoReturn vs. None in "void" functions - type annotations in Python 3.6 : <p>Python 3.6 supports type annotation, like:</p>

<pre><code>def foo() -&gt; int:
    return 42
</code></pre>

<p>But what is expected to use when a function hasn't return anything? <a href="https://www.python.org/dev/peps/pep-0484/" rel="noreferrer">PEP484</a> examples mostly use <code>None</code> as a return type, but there is also <code>NoReturn</code> type from <code>typing</code> package.</p>

<p>So, the question is what is preferable to use and what is considered a best practice:</p>

<pre><code>def foo() -&gt; None:
    #do smth
</code></pre>

<p>or</p>

<pre><code>from typing import NoReturn

def foo() -&gt; NoReturn:
    #do smth
</code></pre>
