Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doit/doit_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ class DoitConfig():
_TOML_LIBS = ['toml', 'tomlkit']
PLUGIN_TYPES = ['command', 'loader', 'backend', 'reporter']

# configuration file entry prefix
PREFIX = 'tool.doit'

def __init__(self):
self._toml = None
self.config = defaultdict(dict)

def loads(self, config_filenames):
for config_filename in config_filenames:
if str(config_filename).lower().endswith('.toml'):
prefix = 'tool.doit' if config_filename == 'pyproject.toml' else ''
prefix = self.PREFIX if config_filename == 'pyproject.toml' else ''
toml_config = self.load_config_toml(config_filename, prefix)
for section in toml_config:
self.config[section].update(toml_config[section].items())
Expand Down