src/eric7/CodeFormatting/IsortFormattingDialog.py

branch
eric7
changeset 10409
8d888f38bf89
parent 10136
ae09a4a9b0d1
child 10439
21c28b0f9e41
equal deleted inserted replaced
10408:8824b6d71a11 10409:8d888f38bf89
89 # project specific configuration files (like pyproject.toml). The configuration 89 # project specific configuration files (like pyproject.toml). The configuration
90 # given as a dictionary (i.e. data entered in the configuration dialog) 90 # given as a dictionary (i.e. data entered in the configuration dialog)
91 # overwrites these. If the project is not passed, the isort config is based on 91 # overwrites these. If the project is not passed, the isort config is based on
92 # the isort defaults. 92 # the isort defaults.
93 if project: 93 if project:
94 # clear the caches in order to force a re-read of config files 94 with contextlib.suppress(AttributeError):
95 settings._get_config_data.cache_clear() 95 # for isort < 5.13.0
96 settings._find_config.cache_clear() 96 # clear the caches in order to force a re-read of config files
97 settings._get_config_data.cache_clear()
98 settings._find_config.cache_clear()
97 try: 99 try:
98 self.__isortConfig = ( 100 self.__isortConfig = (
99 settings.Config(settings_path=project.getProjectPath(), **self.__config) 101 settings.Config(settings_path=project.getProjectPath(), **self.__config)
100 if project 102 if project
101 else settings.Config(**self.__config) 103 else settings.Config(**self.__config)

eric ide

mercurial