JulianEberius / SublimePythonIDE

ST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
GNU General Public License v2.0
267 stars 38 forks source link

Add Disable/Enable PEP8 commands. #53

Closed xiaochuanyu closed 10 years ago

xiaochuanyu commented 10 years ago

This resolves #52. This adds commands to enable/disable pep8 linting on a per view basis. The diff in sublime_python_linting.py may look scary but there's was no functional change other than adding commands as stated in title. Here is summary of my changes:

  1. Re-factored out nearly all methods from PythonLintingListener to module level, this was necessary to expose the check method. The alternative was to make everything class methods but I think making them module level is cleaner.
  2. Added some helper function to override view settings in sublime_python.py.
  3. Added enable and disable PEP8 command classes which will enable / disable pep8 setting on a per view basis.
  4. I did some basic testing, nothing appeared to be broken.
JulianEberius commented 10 years ago

Thanks! Seems to work, I've merged it into master.