Problems With Python Linter

#1

I am new to Atom and have been setting it up to be my perfect Python IDE. Ideally, that will include a great linter, but I’ve been frustrated by my inability to have any of the four I’ve tried to install work. Finally, late last night I figured out that the problem lies with my failing to put the path to the underlying Python linter in my config. cson file.

Since I have absolutely no experience with Coffeescript I come seeking advice. I find the recommended entry in the configuration file is:

'linter-python-pep8':
  'pep8DirToExecutable': '/usr/local/bin/'
  'ignoreErrorCodes': 'E501, W292'

On the assumption that this pathname is for an OS other than Windows I come up with this:

'linter-python-pep8':
  'pep8DirToExecutable': 'c:\users\myusername\...'
  'ignoreErrorCodes': 'E501, W292'

Unfortunately, when filling in the entire pathname in place of the ellipsis the line extends beyond 80 characters. The best answer I can find without getting deeper into Coffeescript than I with is this:

'linter-python-pep8':
  'pep8DirToExecutable': 'c:\users\myusername\appdata\' +
                         'local\programs\python\python37\' +
                         'lib\site-packages'
  'ignoreErrorCodes': 'E501, W292'

I have tried this but when that is in the configuration file Atom refuses to open and I’ve had to go in with another editor and remove it.

Please Help! Thanks in Advance

#2

Atom shouldn’t care how many characters are in each line. Are you seeing behavior indicating that it does?

#3

The line breaks at 80 characters and the rest is put on the next line at the far left side. From the little, I’ve been able to Google about Coffeescript white space and indentation are important.

#4

I have a line in config.cson that’s longer than 80 characters (see below, line 144). Are you sure you don’t have a package automatically formatting your config file on save, such as atom-beautify?

#5

If you’re feeling more at home with JSON, you can simply convert and replace your config.cson with config.json.

Could this by any chance be related to your soft wrap settings? Try disabling it in the editor settings.

I also notice syntax errors in your config: all backslashes need to be escaped, both in JSON and CSON

# Wrong
c:\users\myusername\...

# Correct
c:\\users\\myusername\\...
#6

Actually, I am equally unfamiliar with .json as I am with .cson. I am a retired oldschool guy who started in the days of coding sheets punch card decks trying to keep my mind sharp by learning Python. I was clueless about escaping the backslashes and believe that is the root of my problems. Out of cuiosity, would my concatenated strings worked without the backslash issue?

Thanks for your help.

#7

By the way, JSON isn’t too different from Python’s own dictionaries (read this)

No