In settings, there an setting called 'Type Checking Mode' inside "python > Analysis" You can set it to Off, Basic, Standard or Strict.