title: Pycharm expected type 'optional[bytes]' got 'str' instead
body: <p>I am using <code>rsplit</code> to split up a path name, </p>
  
  <pre><code>rootPath = os.path.abspath(__file__)
  rootPath = (rootPath.rsplit('/', 1)[0]).rsplit('/', 1)[0]
  </code></pre>
  
  <p>But <strong>Pycharm</strong> warns,</p>
  
  <blockquote>
    <p>expected type <code>optional [bytes]</code>, got <code>str</code> instead</p>
  </blockquote>
  
  <p>In <code>python doc</code>, it stated <em>using <code>sep</code> as the delimiter string</em>. </p>
  
  <p>So how to fix this?</p>