code: def update_code_analysis_actions(self):
          
          editor = self.get_current_editor()
          # To fix an error at startup
          if editor is None:
              return
          results = editor.get_current_warnings()
          # Update code analysis buttons
          state = (self.get_option('code_analysis/pyflakes') \
                   or self.get_option('code_analysis/pep8')) \
                   and results is not None and len(results)
          for action in (self.warning_list_action, self.previous_warning_action,
                         self.next_warning_action):
              if state is not None:
                  action.setEnabled(state)
docs: Update actions in the warnings menu.