206 # add configured entries |
206 # add configured entries |
207 # FileFilters is a dictionary with the filter name as key and |
207 # FileFilters is a dictionary with the filter name as key and |
208 # a list of file name patterns as value |
208 # a list of file name patterns as value |
209 self.__filters = json.loads( |
209 self.__filters = json.loads( |
210 Preferences.getSettings().value("FindFileWidget/FileFilters", "{}") |
210 Preferences.getSettings().value("FindFileWidget/FileFilters", "{}") |
211 # noqa: M613 |
211 # noqa: M-613 |
212 ) |
212 ) |
213 for fileFilter in sorted(self.__filters): |
213 for fileFilter in sorted(self.__filters): |
214 self.filterComboBox.addItem( |
214 self.filterComboBox.addItem( |
215 self.tr("{0} ({1})").format( |
215 self.tr("{0} ({1})").format( |
216 fileFilter, " ".join(self.__filters[fileFilter]) |
216 fileFilter, " ".join(self.__filters[fileFilter]) |
219 ) |
219 ) |
220 # ExcludeFileFilters is a dictionary with the filter name as key and |
220 # ExcludeFileFilters is a dictionary with the filter name as key and |
221 # a list of file name patterns as value |
221 # a list of file name patterns as value |
222 self.__excludeFilters = json.loads( |
222 self.__excludeFilters = json.loads( |
223 Preferences.getSettings().value("FindFileWidget/ExcludeFileFilters", "{}") |
223 Preferences.getSettings().value("FindFileWidget/ExcludeFileFilters", "{}") |
224 # noqa: M613 |
224 # noqa: M-613 |
225 ) |
225 ) |
226 for fileFilter in sorted(self.__excludeFilters): |
226 for fileFilter in sorted(self.__excludeFilters): |
227 self.excludeFilterComboBox.addItem( |
227 self.excludeFilterComboBox.addItem( |
228 self.tr("{0} ({1})").format( |
228 self.tr("{0} ({1})").format( |
229 fileFilter, " ".join(self.__excludeFilters[fileFilter]) |
229 fileFilter, " ".join(self.__excludeFilters[fileFilter]) |