Preferences/ConfigurationPages/Py3FlakesPage.py

Sat, 30 Jan 2010 18:37:18 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 30 Jan 2010 18:37:18 +0000
changeset 88
3701923bccf2
child 791
9ec2ac20e54e
permissions
-rw-r--r--

Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.

# -*- coding: utf-8 -*-

# Copyright (c) 2010 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing the Py3Flakes configuration page.
"""

from .ConfigurationPageBase import ConfigurationPageBase
from .Ui_Py3FlakesPage import Ui_Py3FlakesPage

import Preferences

class Py3FlakesPage(ConfigurationPageBase, Ui_Py3FlakesPage):
    """
    Class implementing the Python configuration page.
    """
    def __init__(self):
        """
        Constructor
        """
        ConfigurationPageBase.__init__(self)
        self.setupUi(self)
        self.setObjectName("Py3FlakesPage")
        
        # set initial values
        self.includeCheckBox.setChecked(
            Preferences.getFlakes("IncludeInSyntaxCheck"))
        self.ignoreStarImportCheckBox.setChecked(
            Preferences.getFlakes("IgnoreStarImportWarnings"))
    
    def save(self):
        """
        Public slot to save the Python configuration.
        """
        Preferences.setFlakes("IncludeInSyntaxCheck", 
            self.includeCheckBox.isChecked())
        Preferences.setFlakes("IgnoreStarImportWarnings", 
            self.ignoreStarImportCheckBox.isChecked())
    
def create(dlg):
    """
    Module function to create the configuration page.
    
    @param dlg reference to the configuration dialog
    """
    page = Py3FlakesPage()
    return page

eric ide

mercurial