title: Pycharm warning that variable is unused
body: <p>I am not very familiar with Python, especially with the scope of variables. I am trying to access a sqlite database. However, Pycharm's code inspection is warning me that the variable <code>data</code> is not being used. </p>
  
  <pre><code>def getIndexFromDB(self, user, username, domID):
      data = None #warning that this variable is unused
      with lite.connect(self.DBName) as con:
          cur = con.cursor()
          cur.execute('PRAGMA foreign_keys = ON')
          cur.execute('select idx from Upass where username = ? and uname = ? and dom = ?', (user, username, domID))
          data = cur.fetchone()
      return data
  </code></pre>
  
  <p>Is this a pycharm problem? </p>