title: How can I use mypy to type check a date that cannot be a datetime?
body: <p>Let's say I have this function:</p>
  
  <pre><code>def subtract_dates(date1: datetime.date, date2: datetime.date):
      return date1 - date2
  </code></pre>
  
  <p>If I try to call <code>subtract_dates(datetime.date.today(), datetime.datetime.now())</code> this will raise a TypeError because I'm trying to subtract a <code>datetime</code> object from a <code>date</code> object.</p>
  
  <p>However, because datetime inherits from date (see for instance <a href="https://github.com/python/typeshed/issues/2487" rel="nofollow noreferrer">this issue</a>), MyPy does not raise an error on the above call to <code>subtract_dates</code>.</p>
  
  <p>Is there a way to add a MyPy type hint that allows a date object but not a datetime object?</p>