Preferences/ConfigurationPages/Py3FlakesPage.py

Wed, 02 Jan 2013 10:31:48 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 02 Jan 2013 10:31:48 +0100
changeset 2302
f29e9405c851
parent 1509
c0b5e693b0eb
child 2525
8b507a9a2d40
child 3163
9f50365a0870
permissions
-rw-r--r--

Updated copyright for 2013.

88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
2302
f29e9405c851 Updated copyright for 2013.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
3 # Copyright (c) 2010 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Py3Flakes configuration page.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from .ConfigurationPageBase import ConfigurationPageBase
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from .Ui_Py3FlakesPage import Ui_Py3FlakesPage
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 import Preferences
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
15
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class Py3FlakesPage(ConfigurationPageBase, Ui_Py3FlakesPage):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Class implementing the Python configuration page.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 def __init__(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
1131
7781e396c903 Changed the code to use super() to access the superclass.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
24 super().__init__()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 self.setupUi(self)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 self.setObjectName("Py3FlakesPage")
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 # set initial values
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 self.includeCheckBox.setChecked(
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Preferences.getFlakes("IncludeInSyntaxCheck"))
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 self.ignoreStarImportCheckBox.setChecked(
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Preferences.getFlakes("IgnoreStarImportWarnings"))
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 def save(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 Public slot to save the Python configuration.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
38 Preferences.setFlakes("IncludeInSyntaxCheck",
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.includeCheckBox.isChecked())
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
40 Preferences.setFlakes("IgnoreStarImportWarnings",
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.ignoreStarImportCheckBox.isChecked())
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
43
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 def create(dlg):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 Module function to create the configuration page.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 @param dlg reference to the configuration dialog
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 page = Py3FlakesPage()
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 return page

eric ide

mercurial