wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

There is no sidebar menu if all tabs are closed. #30

Closed wistful closed 9 years ago

wistful commented 9 years ago

Step to reproduce: 1) close all opened tabs 2) click on python module or package in the sidebar to open menu. Expected result: "PEP8: Preview Code", "PEP8: Format Code" items in the menu Actual result: AttributeError

Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
  File "./sublautopep8.py", line 27, in Settings
AttributeError: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
  File "./sublautopep8.py", line 27, in Settings
AttributeError: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
    common.DEFAULT_FILE_MENU_BEHAVIOUR)
  File "./sublautopep8.py", line 27, in Settings
    project_config = view.settings().get('sublimeautopep8', {})
AttributeError: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
    common.DEFAULT_FILE_MENU_BEHAVIOUR)
  File "./sublautopep8.py", line 27, in Settings
    project_config = view.settings().get('sublimeautopep8', {})
AttributeError: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
    common.DEFAULT_FILE_MENU_BEHAVIOUR)
  File "./sublautopep8.py", line 27, in Settings
    project_config = view.settings().get('sublimeautopep8', {})
AttributeError: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "./sublime_plugin.py", line 280, in is_visible_
  File "./sublautopep8.py", line 160, in is_visible
    common.DEFAULT_FILE_MENU_BEHAVIOUR)
  File "./sublautopep8.py", line 27, in Settings
    project_config = view.settings().get('sublimeautopep8', {})
AttributeError: 'NoneType' object has no attribute 'settings'
wistful commented 9 years ago

Fixed in v1.2