Improve handling of settings

Constructors of classes which need direct access to configuration
now take Config class instance as parameter which will give them
better maintainability in the future

CHEAT_HIGHLIGHT has been added to Configuration class
This commit is contained in:
Tomas Korbar
2019-01-15 19:13:30 +01:00
parent 3a4c2a887d
commit 5eec6bf040
5 changed files with 43 additions and 35 deletions

View File

@ -61,9 +61,9 @@ if __name__ == '__main__':
options = docopt(__doc__, version='cheat 2.3.1')
config = Configuration()
sheets = Sheets(config.get_default_cheat_dir(),config.get_cheatpath())
sheet = Sheet(config.get_default_cheat_dir(),config.get_cheatpath(),config.get_editor())
utils = Utils(config.get_cheatcolors(),config.get_editor())
sheets = Sheets(config)
utils = Utils(config)
sheet = Sheet(sheets, utils)
# list directories
if options['--directories']: