Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 3 white boxes around lines

enter image description here

Note: Just started programming in Python using Sublime Text 3. I am not sure why I am getting the white dots/mark on every line, see image below. I would like learn the following.

  1. Is it because of an error?
  2. Is it because of a package or command?
  3. I tried CTRL+Space,CTRL+G and CTRL+K and I still get the white marks, shall I be concerned?
like image 571
ASE Dev Avatar asked Jan 04 '17 16:01

ASE Dev


2 Answers

You probably installed Anaconda package. If so, you need to go to Preferences → Package Settings → Anaconda → Settings-User. Then paste the following code and save. Those boxes should be gone.

{     "anaconda_linting": false, } 
like image 82
James Xingjian Zhang Avatar answered Oct 03 '22 04:10

James Xingjian Zhang


This is due to an incorrectly-configured SublimeLinter installation. You can read here on how to configure this quite complex plugin, along with whichever associated Python linter(s) you installed. Alternatively, you can disable the plugin entirely by selecting Preferences → Package Control → Package Control: Disable Package then typing in sublimelinter and hitting Enter.

If you're interested, you're getting the errors because your code isn't PEP8-compliant and contains some other errors. You need to use whitespace more:

listone = [1, 2, 3] listtwo = [1, 2, 3] matrix_one = [listone, listtwo] matrix_one = [row[0] for row in matrix_one] # are you sure you really want                                             # to overwrite your original matrix?  print matrix_one # you had matrix_ones in your original code 

I'd also strongly encourage you to use Python 3 if you're just beginning to learn the language. The Stack Overflow Python community overwhelmingly recommends starting with Python 3, as does python.org itself. Version 3 is the present and future of the language, while 2 is the past. In learning 2 first, you'll pick up many bad habits that will need to be corrected when you learn 3 (which you'll need to do eventually), so it's much better to start with 3 first, then learn the differences in 2 later.

like image 31
MattDMo Avatar answered Oct 03 '22 04:10

MattDMo