Open kaweantonio opened 1 year ago
@warsaw can you review this PR?
@krcb197 The fix only looks in the current working directory, but shouldn't be hard to improve load_configs_from_file
to match Black behavior/logic. I'll update my PR in the next days to include this change.
@krcb197 PR updated applying Black logic for config files. Waiting for your review :)
Looks good to me
Fixes: #78
Blue relies on flake8 to parse config files like 'setup.cfg', 'tox.ini' and '.blue'. This was done using
ConfigParser
andConfigFileFinder
classes, but in flake8 v5/6 these classes have been removed.To fix the problem, all flake8 related code was removed and replace with a new function that parses the config files. This is all done using
ConfigParser
class from configparser module.The new function is largely inspired by Flake8 own implementation, mainly the
load_config
andparse_config
functions.