77 |
77 |
78 self.progressBar.setMaximum(len(filesList)) |
78 self.progressBar.setMaximum(len(filesList)) |
79 |
79 |
80 self.resultsList.header().setSortIndicator(1, Qt.SortOrder.AscendingOrder) |
80 self.resultsList.header().setSortIndicator(1, Qt.SortOrder.AscendingOrder) |
81 |
81 |
|
82 self.__project = project |
|
83 |
82 self.__config = copy.deepcopy(configuration) |
84 self.__config = copy.deepcopy(configuration) |
83 self.__config["quiet"] = True # we don't want extra output |
85 self.__config["quiet"] = True # we don't want extra output |
84 self.__config["overwrite_in_place"] = True # we want to overwrite the files |
86 self.__config["overwrite_in_place"] = True # we want to overwrite the files |
85 if "config_source" in self.__config: |
87 if "config_source" in self.__config: |
86 del self.__config["config_source"] |
88 del self.__config["config_source"] |
87 self.__isortConfig = Config(**self.__config) |
89 |
|
90 # Create an isort Config object and pre-load it with parameters contained in |
|
91 # project specific configuration files (like pyproject.toml). The configuration |
|
92 # given as a dictionary (i.e. data entered in the configuration dialog) |
|
93 # overwrites these. If the project is not passed, the isort config is based on |
|
94 # the isort defaults. |
|
95 self.__isortConfig = ( |
|
96 Config(settings_path=project.getProjectPath(), **self.__config) |
|
97 if project |
|
98 else Config(**self.__config) |
|
99 ) |
|
100 |
88 self.__config["__action__"] = action # needed by the workers |
101 self.__config["__action__"] = action # needed by the workers |
89 self.__project = project |
|
90 |
102 |
91 self.__filesList = filesList[:] |
103 self.__filesList = filesList[:] |
92 |
104 |
93 self.__diffDialog = None |
105 self.__diffDialog = None |
94 |
106 |