title: type hinting an array
body: <p>Consider the following minimal example:</p>
  <pre><code>from array import array
  
  
  def foo(arr: array) -&gt; None:
      print(arr)
  </code></pre>
  <p>I have a function which takes an <code>array</code> argument.
  My project is statically typed and uses <a href="https://mypy.readthedocs.io/en/stable/" rel="nofollow noreferrer">mypy</a>.
  Mypy complains that:
  <code>Mypy: Missing type parameters for generic type &quot;array&quot;</code>.</p>
  <p>Could you help me understand how am I supposed to type hint the argument? I can't seem to find documentation on the subject. I can't understand why would mypy decide this is a generic type.</p>
  <p>To clarify, to my understanding, the type hint I used works, but mypy still complains as it considers it as a generic type, and wants the type of the &quot;elements&quot;. Am I missing something, or is it a bug in mypy?</p>
  <p>Related to this:
  <a href="https://stackoverflow.com/questions/67775113/whats-the-type-hint-for-an-array">What&#39;s the type hint for an array?</a></p>