title: tell pycharm that a variable will have a value
body: <p>I am reading in some data with try, except blocks (to allow for managed shutdown in case of errors), this often causes Pycharm to read variables as &quot;may be referenced before assignment&quot; as it is apparently incapable of working out that they will either have a value or the function will be exited.
  e.g.</p>
  <pre><code>import sys
  
  
  def program_exit(code):
      sys.exit(code)
  
  
  def read_a(input_value):
      try:
          a = input_value
      except:
          program_exit(5)
      a += 1       # referenced before assignment warning
      return a
  </code></pre>
  <p>I know it is possible to block the warning for a specific line but is there any way to tell pycharm that the variable will be defined so that I don't have to block the warning for all subsequent uses of the variable
  e.g.</p>
  <pre><code>import sys
  
  
  def program_exit(code):
      sys.exit(code)
  
  
  def read_a(input_value):
      try:
          a = input_value
      except:
          program_exit(5)
      # Pycharm: has_value(a)
      a += 1       # no warning
      return a
  </code></pre>
  <p>Thanks</p>