src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
eric7
changeset 10806
2f6df822e3b9
parent 10761
63618ecdbe57
child 11002
0c62941f8baa
equal deleted inserted replaced
10805:c114e9476034 10806:2f6df822e3b9
25 QLineEdit, 25 QLineEdit,
26 QListWidgetItem, 26 QListWidgetItem,
27 QTreeWidgetItem, 27 QTreeWidgetItem,
28 ) 28 )
29 29
30 from eric7 import Preferences, Utilities 30 from eric7 import EricUtilities, Preferences, Utilities
31 from eric7.EricGui import EricPixmapCache 31 from eric7.EricGui import EricPixmapCache
32 from eric7.EricWidgets.EricApplication import ericApp 32 from eric7.EricWidgets.EricApplication import ericApp
33 from eric7.QScintilla.Editor import EditorWarningKind 33 from eric7.QScintilla.Editor import EditorWarningKind
34 from eric7.SystemUtilities import FileSystemUtilities 34 from eric7.SystemUtilities import FileSystemUtilities
35 35
1692 ) 1692 )
1693 self.includeMessagesEdit.setText( 1693 self.includeMessagesEdit.setText(
1694 settings.value("PEP8/IncludeMessages", defaultParameters["IncludeMessages"]) 1694 settings.value("PEP8/IncludeMessages", defaultParameters["IncludeMessages"])
1695 ) 1695 )
1696 self.repeatCheckBox.setChecked( 1696 self.repeatCheckBox.setChecked(
1697 Preferences.toBool( 1697 EricUtilities.toBool(
1698 settings.value( 1698 settings.value(
1699 "PEP8/RepeatMessages", defaultParameters["RepeatMessages"] 1699 "PEP8/RepeatMessages", defaultParameters["RepeatMessages"]
1700 ) 1700 )
1701 ) 1701 )
1702 ) 1702 )
1705 ) 1705 )
1706 self.noFixIssuesEdit.setText( 1706 self.noFixIssuesEdit.setText(
1707 settings.value("PEP8/NoFixCodes", defaultParameters["NoFixCodes"]) 1707 settings.value("PEP8/NoFixCodes", defaultParameters["NoFixCodes"])
1708 ) 1708 )
1709 self.fixIssuesCheckBox.setChecked( 1709 self.fixIssuesCheckBox.setChecked(
1710 Preferences.toBool( 1710 EricUtilities.toBool(
1711 settings.value("PEP8/FixIssues", defaultParameters["FixIssues"]) 1711 settings.value("PEP8/FixIssues", defaultParameters["FixIssues"])
1712 ) 1712 )
1713 ) 1713 )
1714 self.ignoredCheckBox.setChecked( 1714 self.ignoredCheckBox.setChecked(
1715 Preferences.toBool( 1715 EricUtilities.toBool(
1716 settings.value("PEP8/ShowIgnored", defaultParameters["ShowIgnored"]) 1716 settings.value("PEP8/ShowIgnored", defaultParameters["ShowIgnored"])
1717 ) 1717 )
1718 ) 1718 )
1719 self.lineLengthSpinBox.setValue( 1719 self.lineLengthSpinBox.setValue(
1720 int( 1720 int(
1741 "PEP8/BlankLinesBeforeMethod", defaultParameters["BlankLines"][1] 1741 "PEP8/BlankLinesBeforeMethod", defaultParameters["BlankLines"][1]
1742 ) 1742 )
1743 ) 1743 )
1744 ) 1744 )
1745 self.hangClosingCheckBox.setChecked( 1745 self.hangClosingCheckBox.setChecked(
1746 Preferences.toBool( 1746 EricUtilities.toBool(
1747 settings.value("PEP8/HangClosing", defaultParameters["HangClosing"]) 1747 settings.value("PEP8/HangClosing", defaultParameters["HangClosing"])
1748 ) 1748 )
1749 ) 1749 )
1750 self.docTypeComboBox.setCurrentIndex( 1750 self.docTypeComboBox.setCurrentIndex(
1751 self.docTypeComboBox.findData( 1751 self.docTypeComboBox.findData(
1789 ) 1789 )
1790 self.__initFuturesList( 1790 self.__initFuturesList(
1791 settings.value("PEP8/FutureChecker", defaultParameters["FutureChecker"]) 1791 settings.value("PEP8/FutureChecker", defaultParameters["FutureChecker"])
1792 ) 1792 )
1793 self.__initBuiltinsIgnoreList( 1793 self.__initBuiltinsIgnoreList(
1794 Preferences.toDict( 1794 EricUtilities.toDict(
1795 settings.value( 1795 settings.value(
1796 "PEP8/BuiltinsChecker", defaultParameters["BuiltinsChecker"] 1796 "PEP8/BuiltinsChecker", defaultParameters["BuiltinsChecker"]
1797 ) 1797 )
1798 ) 1798 )
1799 ) 1799 )
1800 self.aggressiveCheckBox.setChecked( 1800 self.aggressiveCheckBox.setChecked(
1801 Preferences.toBool( 1801 EricUtilities.toBool(
1802 settings.value( 1802 settings.value(
1803 "PEP8/AggressiveSearch", 1803 "PEP8/AggressiveSearch",
1804 defaultParameters["CommentedCodeChecker"]["Aggressive"], 1804 defaultParameters["CommentedCodeChecker"]["Aggressive"],
1805 ) 1805 )
1806 ) 1806 )
1807 ) 1807 )
1808 self.__initCommentedCodeCheckerWhiteList( 1808 self.__initCommentedCodeCheckerWhiteList(
1809 Preferences.toList( 1809 EricUtilities.toList(
1810 settings.value( 1810 settings.value(
1811 "PEP8/CommentedCodeWhitelist", 1811 "PEP8/CommentedCodeWhitelist",
1812 defaultParameters["CommentedCodeChecker"]["WhiteList"], 1812 defaultParameters["CommentedCodeChecker"]["WhiteList"],
1813 ) 1813 )
1814 ) 1814 )
1838 defaultParameters["AnnotationsChecker"]["MaximumLength"], 1838 defaultParameters["AnnotationsChecker"]["MaximumLength"],
1839 ) 1839 )
1840 ) 1840 )
1841 ) 1841 )
1842 self.suppressNoneReturningCheckBox.setChecked( 1842 self.suppressNoneReturningCheckBox.setChecked(
1843 Preferences.toBool( 1843 EricUtilities.toBool(
1844 settings.value( 1844 settings.value(
1845 "PEP8/SuppressNoneReturning", 1845 "PEP8/SuppressNoneReturning",
1846 defaultParameters["AnnotationsChecker"]["SuppressNoneReturning"], 1846 defaultParameters["AnnotationsChecker"]["SuppressNoneReturning"],
1847 ) 1847 )
1848 ) 1848 )
1849 ) 1849 )
1850 self.suppressDummyArgsCheckBox.setChecked( 1850 self.suppressDummyArgsCheckBox.setChecked(
1851 Preferences.toBool( 1851 EricUtilities.toBool(
1852 settings.value( 1852 settings.value(
1853 "PEP8/SuppressDummyArgs", 1853 "PEP8/SuppressDummyArgs",
1854 defaultParameters["AnnotationsChecker"]["SuppressDummyArgs"], 1854 defaultParameters["AnnotationsChecker"]["SuppressDummyArgs"],
1855 ) 1855 )
1856 ) 1856 )
1857 ) 1857 )
1858 self.allowUntypedDefsCheckBox.setChecked( 1858 self.allowUntypedDefsCheckBox.setChecked(
1859 Preferences.toBool( 1859 EricUtilities.toBool(
1860 settings.value( 1860 settings.value(
1861 "PEP8/AllowUntypedDefs", 1861 "PEP8/AllowUntypedDefs",
1862 defaultParameters["AnnotationsChecker"]["AllowUntypedDefs"], 1862 defaultParameters["AnnotationsChecker"]["AllowUntypedDefs"],
1863 ) 1863 )
1864 ) 1864 )
1865 ) 1865 )
1866 self.allowUntypedNestedCheckBox.setChecked( 1866 self.allowUntypedNestedCheckBox.setChecked(
1867 Preferences.toBool( 1867 EricUtilities.toBool(
1868 settings.value( 1868 settings.value(
1869 "PEP8/AllowUntypedNested", 1869 "PEP8/AllowUntypedNested",
1870 defaultParameters["AnnotationsChecker"]["AllowUntypedNested"], 1870 defaultParameters["AnnotationsChecker"]["AllowUntypedNested"],
1871 ) 1871 )
1872 ) 1872 )
1873 ) 1873 )
1874 self.mypyInitReturnCheckBox.setChecked( 1874 self.mypyInitReturnCheckBox.setChecked(
1875 Preferences.toBool( 1875 EricUtilities.toBool(
1876 settings.value( 1876 settings.value(
1877 "PEP8/MypyInitReturn", 1877 "PEP8/MypyInitReturn",
1878 defaultParameters["AnnotationsChecker"]["MypyInitReturn"], 1878 defaultParameters["AnnotationsChecker"]["MypyInitReturn"],
1879 ) 1879 )
1880 ) 1880 )
1881 ) 1881 )
1882 self.allowStarArgAnyCheckBox.setChecked( 1882 self.allowStarArgAnyCheckBox.setChecked(
1883 Preferences.toBool( 1883 EricUtilities.toBool(
1884 settings.value( 1884 settings.value(
1885 "PEP8/AllowStarArgAny", 1885 "PEP8/AllowStarArgAny",
1886 defaultParameters["AnnotationsChecker"]["AllowStarArgAny"], 1886 defaultParameters["AnnotationsChecker"]["AllowStarArgAny"],
1887 ) 1887 )
1888 ) 1888 )
1889 ) 1889 )
1890 self.forceFutureAnnotationsCheckBox.setChecked( 1890 self.forceFutureAnnotationsCheckBox.setChecked(
1891 Preferences.toBool( 1891 EricUtilities.toBool(
1892 settings.value( 1892 settings.value(
1893 "PEP8/ForceFutureAnnotations", 1893 "PEP8/ForceFutureAnnotations",
1894 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"], 1894 defaultParameters["AnnotationsChecker"]["ForceFutureAnnotations"],
1895 ) 1895 )
1896 ) 1896 )
1897 ) 1897 )
1898 self.simplifiedTypesCheckBox.setChecked( 1898 self.simplifiedTypesCheckBox.setChecked(
1899 Preferences.toBool( 1899 EricUtilities.toBool(
1900 settings.value( 1900 settings.value(
1901 "PEP8/CheckFutureAnnotations", 1901 "PEP8/CheckFutureAnnotations",
1902 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"], 1902 defaultParameters["AnnotationsChecker"]["CheckFutureAnnotations"],
1903 ) 1903 )
1904 ) 1904 )
1905 ) 1905 )
1906 self.typeIgnoreCheckBox.setChecked( 1906 self.typeIgnoreCheckBox.setChecked(
1907 Preferences.toBool( 1907 EricUtilities.toBool(
1908 settings.value( 1908 settings.value(
1909 "PEP8/RespectTypeIgnore", 1909 "PEP8/RespectTypeIgnore",
1910 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"], 1910 defaultParameters["AnnotationsChecker"]["RespectTypeIgnore"],
1911 ) 1911 )
1912 ) 1912 )
1913 ) 1913 )
1914 self.dispatchDecoratorEdit.setText( 1914 self.dispatchDecoratorEdit.setText(
1915 ", ".join( 1915 ", ".join(
1916 Preferences.toList( 1916 EricUtilities.toList(
1917 settings.value( 1917 settings.value(
1918 "PEP8/DispatchDecorators", 1918 "PEP8/DispatchDecorators",
1919 defaultParameters["AnnotationsChecker"]["DispatchDecorators"], 1919 defaultParameters["AnnotationsChecker"]["DispatchDecorators"],
1920 ) 1920 )
1921 ) 1921 )
1922 ) 1922 )
1923 ) 1923 )
1924 self.overloadDecoratorEdit.setText( 1924 self.overloadDecoratorEdit.setText(
1925 ", ".join( 1925 ", ".join(
1926 Preferences.toList( 1926 EricUtilities.toList(
1927 settings.value( 1927 settings.value(
1928 "PEP8/OverloadDecorators", 1928 "PEP8/OverloadDecorators",
1929 defaultParameters["AnnotationsChecker"]["OverloadDecorators"], 1929 defaultParameters["AnnotationsChecker"]["OverloadDecorators"],
1930 ) 1930 )
1931 ) 1931 )
1932 ) 1932 )
1933 ) 1933 )
1934 self.exemptedTypingSymbolsEdit.setText( 1934 self.exemptedTypingSymbolsEdit.setText(
1935 ", ".join( 1935 ", ".join(
1936 Preferences.toList( 1936 EricUtilities.toList(
1937 settings.value( 1937 settings.value(
1938 "PEP8/ExemptedTypingSymbols", 1938 "PEP8/ExemptedTypingSymbols",
1939 defaultParameters["AnnotationsChecker"][ 1939 defaultParameters["AnnotationsChecker"][
1940 "ExemptedTypingSymbols" 1940 "ExemptedTypingSymbols"
1941 ], 1941 ],
1945 ) 1945 )
1946 1946
1947 # Security Checker 1947 # Security Checker
1948 self.tmpDirectoriesEdit.setPlainText( 1948 self.tmpDirectoriesEdit.setPlainText(
1949 "\n".join( 1949 "\n".join(
1950 Preferences.toList( 1950 EricUtilities.toList(
1951 settings.value( 1951 settings.value(
1952 "PEP8/HardcodedTmpDirectories", 1952 "PEP8/HardcodedTmpDirectories",
1953 defaultParameters["SecurityChecker"]["HardcodedTmpDirectories"], 1953 defaultParameters["SecurityChecker"]["HardcodedTmpDirectories"],
1954 ) 1954 )
1955 ) 1955 )
1956 ) 1956 )
1957 ) 1957 )
1958 self.hashesEdit.setText( 1958 self.hashesEdit.setText(
1959 ", ".join( 1959 ", ".join(
1960 Preferences.toList( 1960 EricUtilities.toList(
1961 settings.value( 1961 settings.value(
1962 "PEP8/InsecureHashes", 1962 "PEP8/InsecureHashes",
1963 defaultParameters["SecurityChecker"]["InsecureHashes"], 1963 defaultParameters["SecurityChecker"]["InsecureHashes"],
1964 ) 1964 )
1965 ) 1965 )
1966 ) 1966 )
1967 ) 1967 )
1968 self.insecureSslProtocolsEdit.setPlainText( 1968 self.insecureSslProtocolsEdit.setPlainText(
1969 "\n".join( 1969 "\n".join(
1970 Preferences.toList( 1970 EricUtilities.toList(
1971 settings.value( 1971 settings.value(
1972 "PEP8/InsecureSslProtocolVersions", 1972 "PEP8/InsecureSslProtocolVersions",
1973 defaultParameters["SecurityChecker"][ 1973 defaultParameters["SecurityChecker"][
1974 "InsecureSslProtocolVersions" 1974 "InsecureSslProtocolVersions"
1975 ], 1975 ],
2012 "PEP8/WeakKeySizeEcMedium", 2012 "PEP8/WeakKeySizeEcMedium",
2013 defaultParameters["SecurityChecker"]["WeakKeySizeEcMedium"], 2013 defaultParameters["SecurityChecker"]["WeakKeySizeEcMedium"],
2014 ) 2014 )
2015 ) 2015 )
2016 self.typedExceptionsCheckBox.setChecked( 2016 self.typedExceptionsCheckBox.setChecked(
2017 Preferences.toBool( 2017 EricUtilities.toBool(
2018 settings.value( 2018 settings.value(
2019 "PEP8/CheckTypedException", 2019 "PEP8/CheckTypedException",
2020 defaultParameters["SecurityChecker"]["CheckTypedException"], 2020 defaultParameters["SecurityChecker"]["CheckTypedException"],
2021 ) 2021 )
2022 ) 2022 )
2024 2024
2025 # Imports Checker 2025 # Imports Checker
2026 self.appPackagesEdit.setPlainText( 2026 self.appPackagesEdit.setPlainText(
2027 " ".join( 2027 " ".join(
2028 sorted( 2028 sorted(
2029 Preferences.toList( 2029 EricUtilities.toList(
2030 settings.value( 2030 settings.value(
2031 "PEP8/ApplicationPackageNames", 2031 "PEP8/ApplicationPackageNames",
2032 defaultParameters["ImportsChecker"][ 2032 defaultParameters["ImportsChecker"][
2033 "ApplicationPackageNames" 2033 "ApplicationPackageNames"
2034 ], 2034 ],
2038 ) 2038 )
2039 ) 2039 )
2040 self.bannedModulesEdit.setPlainText( 2040 self.bannedModulesEdit.setPlainText(
2041 " ".join( 2041 " ".join(
2042 sorted( 2042 sorted(
2043 Preferences.toList( 2043 EricUtilities.toList(
2044 settings.value( 2044 settings.value(
2045 "PEP8/BannedModules", 2045 "PEP8/BannedModules",
2046 defaultParameters["ImportsChecker"]["BannedModules"], 2046 defaultParameters["ImportsChecker"]["BannedModules"],
2047 ) 2047 )
2048 ) 2048 )
2063 "PEP8/SortOrder", defaultParameters["NameOrderChecker"]["SortOrder"] 2063 "PEP8/SortOrder", defaultParameters["NameOrderChecker"]["SortOrder"]
2064 ) 2064 )
2065 ) 2065 )
2066 ) 2066 )
2067 self.sortCaseSensitiveCheckBox.setChecked( 2067 self.sortCaseSensitiveCheckBox.setChecked(
2068 Preferences.toBool( 2068 EricUtilities.toBool(
2069 settings.value( 2069 settings.value(
2070 "PEP8/SortCaseSensitive", 2070 "PEP8/SortCaseSensitive",
2071 defaultParameters["NameOrderChecker"]["SortCaseSensitive"], 2071 defaultParameters["NameOrderChecker"]["SortCaseSensitive"],
2072 ) 2072 )
2073 ) 2073 )
2074 ) 2074 )
2075 self.combinedAsImpotsCheckBox.setChecked( 2075 self.combinedAsImpotsCheckBox.setChecked(
2076 Preferences.toBool( 2076 EricUtilities.toBool(
2077 settings.value( 2077 settings.value(
2078 "PEP8/CombinedAsImports", 2078 "PEP8/CombinedAsImports",
2079 defaultParameters["NameOrderChecker"]["CombinedAsImports"], 2079 defaultParameters["NameOrderChecker"]["CombinedAsImports"],
2080 ) 2080 )
2081 ) 2081 )
2082 ) 2082 )
2083 self.sortIgnoreStyleCheckBox.setChecked( 2083 self.sortIgnoreStyleCheckBox.setChecked(
2084 Preferences.toBool( 2084 EricUtilities.toBool(
2085 settings.value( 2085 settings.value(
2086 "PEP8/SortIgnoringStyle", 2086 "PEP8/SortIgnoringStyle",
2087 defaultParameters["NameOrderChecker"]["SortIgnoringStyle"], 2087 defaultParameters["NameOrderChecker"]["SortIgnoringStyle"],
2088 ) 2088 )
2089 ) 2089 )
2090 ) 2090 )
2091 self.sortFromFirstCheckBox.setChecked( 2091 self.sortFromFirstCheckBox.setChecked(
2092 Preferences.toBool( 2092 EricUtilities.toBool(
2093 settings.value( 2093 settings.value(
2094 "PEP8/SortFromFirst", 2094 "PEP8/SortFromFirst",
2095 defaultParameters["NameOrderChecker"]["SortFromFirst"], 2095 defaultParameters["NameOrderChecker"]["SortFromFirst"],
2096 ) 2096 )
2097 ) 2097 )
2098 ) 2098 )
2099 2099
2100 # Unused Checker 2100 # Unused Checker
2101 self.ignoreAbstractCheckBox.setChecked( 2101 self.ignoreAbstractCheckBox.setChecked(
2102 Preferences.toBool( 2102 EricUtilities.toBool(
2103 settings.value( 2103 settings.value(
2104 "PEP8/UnusedIgnoreAbstract", 2104 "PEP8/UnusedIgnoreAbstract",
2105 defaultParameters["UnusedChecker"]["IgnoreAbstract"], 2105 defaultParameters["UnusedChecker"]["IgnoreAbstract"],
2106 ) 2106 )
2107 ) 2107 )
2108 ) 2108 )
2109 self.ignoreOverloadCheckBox.setChecked( 2109 self.ignoreOverloadCheckBox.setChecked(
2110 Preferences.toBool( 2110 EricUtilities.toBool(
2111 settings.value( 2111 settings.value(
2112 "PEP8/UnusedIgnoreOverload", 2112 "PEP8/UnusedIgnoreOverload",
2113 defaultParameters["UnusedChecker"]["IgnoreOverload"], 2113 defaultParameters["UnusedChecker"]["IgnoreOverload"],
2114 ) 2114 )
2115 ) 2115 )
2116 ) 2116 )
2117 self.ignoreOverrideCheckBox.setChecked( 2117 self.ignoreOverrideCheckBox.setChecked(
2118 Preferences.toBool( 2118 EricUtilities.toBool(
2119 settings.value( 2119 settings.value(
2120 "PEP8/UnusedIgnoreOverride", 2120 "PEP8/UnusedIgnoreOverride",
2121 defaultParameters["UnusedChecker"]["IgnoreOverride"], 2121 defaultParameters["UnusedChecker"]["IgnoreOverride"],
2122 ) 2122 )
2123 ) 2123 )
2124 ) 2124 )
2125 self.ignoreStubsCheckBox.setChecked( 2125 self.ignoreStubsCheckBox.setChecked(
2126 Preferences.toBool( 2126 EricUtilities.toBool(
2127 settings.value( 2127 settings.value(
2128 "PEP8/UnusedIgnoreStubs", 2128 "PEP8/UnusedIgnoreStubs",
2129 defaultParameters["UnusedChecker"]["IgnoreStubs"], 2129 defaultParameters["UnusedChecker"]["IgnoreStubs"],
2130 ) 2130 )
2131 ) 2131 )
2132 ) 2132 )
2133 self.ignoreVariadicNamesCheckBox.setChecked( 2133 self.ignoreVariadicNamesCheckBox.setChecked(
2134 Preferences.toBool( 2134 EricUtilities.toBool(
2135 settings.value( 2135 settings.value(
2136 "PEP8/UnusedIgnoreVariadicNames", 2136 "PEP8/UnusedIgnoreVariadicNames",
2137 defaultParameters["UnusedChecker"]["IgnoreVariadicNames"], 2137 defaultParameters["UnusedChecker"]["IgnoreVariadicNames"],
2138 ) 2138 )
2139 ) 2139 )
2140 ) 2140 )
2141 self.ignoreLambdasCheckBox.setChecked( 2141 self.ignoreLambdasCheckBox.setChecked(
2142 Preferences.toBool( 2142 EricUtilities.toBool(
2143 settings.value( 2143 settings.value(
2144 "PEP8/UnusedIgnoreLambdas", 2144 "PEP8/UnusedIgnoreLambdas",
2145 defaultParameters["UnusedChecker"]["IgnoreLambdas"], 2145 defaultParameters["UnusedChecker"]["IgnoreLambdas"],
2146 ) 2146 )
2147 ) 2147 )
2148 ) 2148 )
2149 self.ignoreNestedFunctionsCheckBox.setChecked( 2149 self.ignoreNestedFunctionsCheckBox.setChecked(
2150 Preferences.toBool( 2150 EricUtilities.toBool(
2151 settings.value( 2151 settings.value(
2152 "PEP8/UnusedIgnoreNestedFunctions", 2152 "PEP8/UnusedIgnoreNestedFunctions",
2153 defaultParameters["UnusedChecker"]["IgnoreNestedFunctions"], 2153 defaultParameters["UnusedChecker"]["IgnoreNestedFunctions"],
2154 ) 2154 )
2155 ) 2155 )
2156 ) 2156 )
2157 self.ignoreDunderMethodsCheckBox.setChecked( 2157 self.ignoreDunderMethodsCheckBox.setChecked(
2158 Preferences.toBool( 2158 EricUtilities.toBool(
2159 settings.value( 2159 settings.value(
2160 "PEP8/UnusedIgnoreDunderMethods", 2160 "PEP8/UnusedIgnoreDunderMethods",
2161 defaultParameters["UnusedChecker"]["IgnoreDunderMethods"], 2161 defaultParameters["UnusedChecker"]["IgnoreDunderMethods"],
2162 ) 2162 )
2163 ) 2163 )
2164 ) 2164 )
2165 self.ignoreSlotsCheckBox.setChecked( 2165 self.ignoreSlotsCheckBox.setChecked(
2166 Preferences.toBool( 2166 EricUtilities.toBool(
2167 settings.value( 2167 settings.value(
2168 "PEP8/UnusedIgnoreSlotMethods", 2168 "PEP8/UnusedIgnoreSlotMethods",
2169 defaultParameters["UnusedChecker"]["IgnoreSlotMethods"], 2169 defaultParameters["UnusedChecker"]["IgnoreSlotMethods"],
2170 ) 2170 )
2171 ) 2171 )
2172 ) 2172 )
2173 self.ignoreEventHandlersCheckBox.setChecked( 2173 self.ignoreEventHandlersCheckBox.setChecked(
2174 Preferences.toBool( 2174 EricUtilities.toBool(
2175 settings.value( 2175 settings.value(
2176 "PEP8/UnusedIgnoreEventHandlerMethods", 2176 "PEP8/UnusedIgnoreEventHandlerMethods",
2177 defaultParameters["UnusedChecker"]["IgnoreEventHandlerMethods"], 2177 defaultParameters["UnusedChecker"]["IgnoreEventHandlerMethods"],
2178 ) 2178 )
2179 ) 2179 )
2180 ) 2180 )
2181 self.ignoreDunderGlobalsCheckBox.setChecked( 2181 self.ignoreDunderGlobalsCheckBox.setChecked(
2182 Preferences.toBool( 2182 EricUtilities.toBool(
2183 settings.value( 2183 settings.value(
2184 "PRP8/UnusedIgnoreDunderGlobals", 2184 "PRP8/UnusedIgnoreDunderGlobals",
2185 defaultParameters["UnusedChecker"]["IgnoreDunderGlobals"], 2185 defaultParameters["UnusedChecker"]["IgnoreDunderGlobals"],
2186 ) 2186 )
2187 ) 2187 )

eric ide

mercurial