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 ], |
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 ) |