Skip to content

Commit

Permalink
Add sections() method to LuigiTomlParser class (fix spotify#3182)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzpqnxow committed Jul 11, 2022
1 parent f8254fd commit d739488
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions luigi/configuration/toml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def read(self, config_paths):

return self.data

def sections(self):
"""Return a list of sections as list of strings"""
return [section for section in self.data.keys() if section.lower() != 'logging']

def get(self, section, option, default=NO_DEFAULT, **kwargs):
try:
return self.data[section][option]
Expand Down

0 comments on commit d739488

Please sign in to comment.