# eric6.Plugins.PluginTabnanny

Module implementing the Tabnanny plugin.

### Global Attributes

author
autoactivate
className
deactivateable
error
longDescription
name
packageName
pyqtApi
shortDescription
version

### Classes

TabnannyPlugin | Class implementing the Tabnanny plugin.

### Functions

None

## TabnannyPlugin

Class implementing the Tabnanny plugin.

### Signals

batchFinished()
  emitted when a style check batch is done
error(str, str)
  emitted in case of an error
indentChecked(str, bool, str, str)
  emitted when the indent check was done.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

TabnannyPlugin | Constructor
__editorClosed | Private slot called, when an editor was closed.
__editorOpened | Private slot called, when a new editor was opened.
__editorShowMenu | Private slot called, when the the editor context menu or a submenu is about to be shown.
__editorTabnanny | Private slot to handle the tabnanny context menu action of the editors.
__initialize | Private slot to (re)initialize the plugin.
__projectBrowserShowMenu | Private slot called, when the the project browser context menu or a submenu is about to be shown.
__projectBrowserTabnanny | Private method to handle the tabnanny context menu action of the project sources browser.
__projectShowMenu | Private slot called, when the the project menu or a submenu is about to be shown.
__projectTabnanny | Private slot used to check the project files for bad indentations.
__serviceError | Private slot handling service errors.
activate | Public method to activate this plugin.
batchJobDone | Public slot handling the completion of a batch job.
cancelIndentBatchCheck | Public method to cancel all batch jobs.
deactivate | Public method to deactivate this plugin.
indentBatchCheck | Public method to prepare an indentation check on multiple Python source files.
indentCheck | Public method to prepare an indentation check on one Python source file.
serviceErrorPy2 | Public slot handling service errors for Python 2.
serviceErrorPy3 | Public slot handling service errors for Python 2.

### Static Methods

None

#### TabnannyPlugin (Constructor)

TabnannyPlugin(ui)

Constructor

ui
  reference to the user interface object (UI.UserInterface)

#### TabnannyPlugin.__editorClosed

__editorClosed(editor)

Private slot called, when an editor was closed.

editor
  reference to the editor (QScintilla.Editor)

#### TabnannyPlugin.__editorOpened

__editorOpened(editor)

Private slot called, when a new editor was opened.

editor
  reference to the new editor (QScintilla.Editor)

#### TabnannyPlugin.__editorShowMenu

__editorShowMenu(menuName, menu, editor)

Private slot called, when the the editor context menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)
editor
  reference to the editor

#### TabnannyPlugin.__editorTabnanny

__editorTabnanny()

Private slot to handle the tabnanny context menu action of the editors.

#### TabnannyPlugin.__initialize

__initialize()

Private slot to (re)initialize the plugin.

#### TabnannyPlugin.__projectBrowserShowMenu

__projectBrowserShowMenu(menuName, menu)

Private slot called, when the the project browser context menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### TabnannyPlugin.__projectBrowserTabnanny

__projectBrowserTabnanny()

Private method to handle the tabnanny context menu action of the project sources browser.

#### TabnannyPlugin.__projectShowMenu

__projectShowMenu(menuName, menu)

Private slot called, when the the project menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### TabnannyPlugin.__projectTabnanny

__projectTabnanny()

Private slot used to check the project files for bad indentations.

#### TabnannyPlugin.__serviceError

__serviceError(fn, msg)

Private slot handling service errors.

fn
  file name (string)
msg
  message text (string)

#### TabnannyPlugin.activate

activate()

Public method to activate this plugin.

Returns:
  tuple of None and activation status (boolean)

#### TabnannyPlugin.batchJobDone

batchJobDone(fx, lang)

Public slot handling the completion of a batch job.

fx
  service name (string)
lang
  language (string)

#### TabnannyPlugin.cancelIndentBatchCheck

cancelIndentBatchCheck()

Public method to cancel all batch jobs.

#### TabnannyPlugin.deactivate

deactivate()

Public method to deactivate this plugin.

#### TabnannyPlugin.indentBatchCheck

indentBatchCheck(argumentsList)

Public method to prepare an indentation check on multiple Python source files.

argumentsList
  list of arguments tuples with each tuple containing filename and source (string, string)

#### TabnannyPlugin.indentCheck

indentCheck(lang, filename, source)

Public method to prepare an indentation check on one Python source file.

lang
  language of the file or None to determine by internal algorithm (str or None)
filename
  source filename (string)
source
  string containing the code to check (string)

#### TabnannyPlugin.serviceErrorPy2

serviceErrorPy2(fx, lang, fn, msg)

Public slot handling service errors for Python 2.

fx
  service name (string)
lang
  language (string)
fn
  file name (string)
msg
  message text (string)

#### TabnannyPlugin.serviceErrorPy3

serviceErrorPy3(fx, lang, fn, msg)

Public slot handling service errors for Python 2.

fx
  service name (string)
lang
  language (string)
fn
  file name (string)
msg
  message text (string)

Up